Post Archive

› September 16, 2002

Image Parse V2

  • Reported by Nate
I'm reviving the old post about an image parsing favelet because I have a slightly modified version and wish to improve it. In a nutshell, it's a bookmark you can use on any page which will parse through and show you all the images used on the page with each width and height and location.



img full path parse

code display fixed 5.22.03 (thanks scriptygoddess)

The bookmarklet above does not add up the file sizes, but it does include the full path of each image from the page.

There are other attributes which can be printed out, such as the following:

  • SRC="location" (included)
  • LOWSRC="location"
  • ALT="alterntiveText"
  • ALIGN="alignment"
  • BORDER="borderWidth"
  • HEIGHT="height" (included)
  • WIDTH="width" (included)
  • HSPACE="horizMargin"
  • VSPACE="verticalMargin"
  • ISMAP
  • USEMAP="#mapName"
  • NAME="imageName" (not filename btw)
  • ONABORT="imgLoadJScode"
  • ONERROR="errorJScode"
  • ONLOAD="imgLoadJScode"
  • SUPPRESS="suppressOrNot"

This could be a set of different favelets depending on how much reporting you desired. If you're just a little bit handy with javascript you can hack the link url in a text editor to get your desired formatting. I'm thinking that "minimal", "standard", and "kitchen sink" versions might be the best way to go - what do you think? Other improvements to be done include slicker formatting, and perhaps someone can provide a version which lists each image once, along with how many times it was used (rather than each instance being listed).

Comments

1. September 16, 2002 01:30 PM

Quote this comment

Kevin Breit Posted…

I love this script! Thank you for making it. This will make my life just a bit easier :)

2. September 16, 2002 02:32 PM

Quote this comment

Nate Posted…

Thanks Kevin! Here’s another version

Img Parse 2b

3. September 16, 2002 02:45 PM

Quote this comment

Nate Posted…

Ok, I just realized that our auto-filter on the comment box inhibits the entry of javascript such as this bookmarklet. So if anyone would like to contribute their own variation of this script, please go ahead and email it to me via the contact page. I’ll post it for you (with credit of course).

4. September 17, 2002 01:32 PM

Quote this comment

Liorean Posted…

Nate, I might be able to do some with this if you mail me the source and what you want it to do more specifically. I’ve gained quite a lot experince with doing this type of things lately.

// Liorean

5. September 17, 2002 02:05 PM

Quote this comment

Nate Posted…

Readers: the script has been emailed to Liorean, let’s wish him luck, and look forward to a new and greatly improved version!

6. September 19, 2002 05:29 PM

Quote this comment

Liorean Posted…

Ok, I’ve come to the stage that I need some suggestions on how to lay things out. In moz and ie6 it currently works good locally but less perfectly online. The main functionality is in the code already, but the display of it is the problem. I can to toggled hide-show boxes for the information, I can to it as a list or as a table, I can center on the image displayed or the information about it. You decide. (Oh, the bookmarklet in it’s current less-than-perfect form is available from my bookmarklets page.)