Intel's Ronler Acres Plant

Silicon Forest
If the type is too small, Ctrl+ is your friend

Thursday, November 10, 2022

HTML Embedding Images

Whenever you insert an image in a Blogger post, the path for the image gets written twice. Being as Blogger creates horrendously long pathnames for these images, the html, if you look at it, looks like a pile of garbage. I see that and I think WTF? But then I put it out of my mind and concentrate on what I am trying to accomplish and that is often to move the image to where I want it, not where Blogger in its infinite stupidity has put it.

Anyway, I got to wondering about this today and I did some checking. The first time the pathname is used is in the a tag which is simply a link. The second time the pathname is used is in the img tag which is what causes the picture to be displayed. If you click on the image in a published post, it will take you to the original image which may be much larger (or smaller) than the published image. If you remove the complete a tag, then clicking the image on the published post will take you to the same image with the same size as it is in your post.

Here is an image inserted using the Blogger. Clicking on it will take you to a much larger image.


Here is the same image inserted the same way, but then I edited the html to remove the a tag. Clicking on it will take you to the same size image.


The link will have a slightly different pathname than the image pathname. Evidently different size images will get stored in different directories.

No comments: