I have a large number of images that I am putting into web pages. Rather than painstakingly enter all of the image attributes, I thought I could write a script that would do the work for me. I just need a little push in the right direction.
I want the script to get the width and height of each image, then format this into an img tag that would include the url I'm using. I'm thinking that first I would loop through the files in the directory and output the results that I'm looking for to a file. Then I can copy and paste.
Ideally, it should eventually have a GUI where you can choose each file, save the result to the clipboard, then paste it directly into the document. But I believe this is beyond me at this point.
I have a basic understanding of coding and have done a smattering of scripts in Python and PHP.
Where do I start? Can I use Python? Or PHP? Or a different language? PHP has the getimagesize() function that returns the data I need. Does Python have a similar function?
Sorry to be long winded. And thanks for any input.