Saturday, December 20, 2014

Blogger only displays some images in Lightbox

Just solved this one for myself. I've got a page (Hordeboloods) that for formatting reasons, I create in Dreamweaver, then copy the code to a Blogger post whenever I want to update it. Noticed an image that the browser would just open instead of displaying in the lightbox display.

Here's how I solved it:

I compared the image to some of my other images, found some discrepancies and the problem ended up being the "alt" property of the image. Even if you don't have any text in the alt text, it appears you need it. Make sure your IMG tag contains:

alt=""

or with a description.

There are a few other differences. There's an imageanchor tag in the A link, the link and the image path had different paths, but changing these (even after I got it working) didn't change whether it worked or not.

2 comments: