Interactions Gallery replace images?

  1. What are the best image sizes for for popup & inline galleries?

  2. Is code below where I replace images and if so what beside data-title and data-description what do I need to keep?

    <a href="" data-title="Blueberries" data-description="They grow in a forest. Pick them up and bake a pie."><img src=""></a>

  1. My personal opinion. With internet speeds going up, there is not so much benefit in serving many different image sizes. Keep thumbnails at x 2 the displayed size to look good on retina. And large images not larger than 200KB - 300KB, again serving x 2 sizes.

  2. Change SRCs, HREFs, data-title and data-descriptions. Keep the <a …> structure.

1 Like

Don’t images require a certain proportion like square, 3x4 for landscape and portrait sizes? It looks like these all have a large amount of background color around the apple, pear, other fruit.

The shape doesn’t matter, they are displayed with object-fit. Of course, you can use CSS to change sizes, shapes any way you want. Style is there just as a starting point.

1 Like

I don’t agree with your personal opinion! And Google doesn’t as well! Using multiple images with different “Art Directions” sizes and file extensions offers a lot of advantages compare to using just one image. The only disadvantage is that it cost you a lot more time. But when you use a cloud service it’s all done automatically. And plugins like Farkas Lazy Sizes make it easy too.

Replacing href= with img src in top line is wrong. What should I do?

<a <img src="img_design/DocDesign764x900.jpg"> data-title="Orange" data-description="Want some orange juice?"><img src="img_design/DocDesign764x900.jpg"></a> data-title="Orange" data-description="Want some orange juice?"> <img src="img_design/DocDesign764x900.jpg">

<a href="" data-title="Banana" data-description="Peel a banana for a quick snack."><img src="img_design/TuxCatRedChair764x900.jpg"></a>

@AllMediaLab that’s why I said it’s my personal opinion :slight_smile: Responsive images are great when you can get them with low effort - for example by postprocessing on some hosting services or with a CMS like WP.

Hi @kat,

the HTML code should be:

<a href="img_design/DocDesign764x900.jpg" data-title="Orange" data-description="Want some orange juice?">
    <img src="img_design/DocDesign[THUMBNAIL SIZE].jpg">

The a href should be the URL of the full size image and the img src should be the URL of its thumbnail.