I have a hard time understanding the sizes on srcset or how to set them.
Also there is img-fluid in Bootstrap.
Lets say i have this:
<section id="listing" class="row mb-4"><!-- Listing -->
<ul class="col-lg-12 text-center">
<li class="mb-4">
<header>
<h2 class="mb-2">Entry 1</h2>
</header>
<a href="https://mydomain.net/entry1">
<picture>
<source srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w,
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w" type="image/jpeg">
<img src="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg"
srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w,
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w"
sizes="(min-width: 900px) 1000px, (max-width: 900px) and (min-width: 400px) 50em, 50vw"
width="auto"
height="250"
class="img-fluid mr-3">
</picture>
<picture>
<source srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w,
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w" type="image/jpeg">
<img src="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg"
srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w,
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w"
sizes="(min-width: 900px) 1000px, (max-width: 900px) and (min-width: 400px) 50em, 50vw"
width="auto"
height="250"
class="img-fluid mr-3">
</picture>
</a>
</li>
<li class="mb-4">
<header>
<h2 class="mb-2">Entry 2</h2>
</header>
<a href="https://mydomain.net/entry2 ">
<picture>
<source srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w" type="image/jpeg">
<img src="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg"
srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w"
sizes="(min-width: 900px) 1000px, (max-width: 900px) and (min-width: 400px) 50em, 50vw"
width="auto"
height="250"
class="img-fluid mr-3">
</picture>
<picture>
<source srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w" type="image/jpeg">
<img src="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg"
srcset="/media/frontcover_00497665dd46c88fddd1253ccd1a95c4.jpg 180w,
/media/frontcover_a81dcdc47d435b3f3d65823d2d137fd0.jpg 360w
/media/frontcover_952d4388dada8a9265cb79206a40abe4.jpg 720w"
sizes="(min-width: 900px) 1000px, (max-width: 900px) and (min-width: 400px) 50em, 50vw"
width="auto"
height="250"
class="img-fluid mr-3">
</picture>
</a>
</li>
</ul>
</section>
In this case i want to show two images side by side width the same height.
The second image can have different widths.
The first image is 250H x 180W and thatâs the sizes you see on a normal FHD PC Monitor.
I also made 500H x 360W and 1000H x 720W for 2x and 4x device pixel radio.
I need to take out img-fluid and set width and height. If i donât do that the picture is stretched over the whole 12 columns.
But non tutorial i did read does set a fixed width or height?
What i have in âsizesâ is just a placeholder because i donât get what to put in there.
If you write articles the pictures you place in your text can have all kind of different sizesâŠ
Also i did read that this takes the internet speed into account?
That means if somebody has a slow connection he gets the picture with the lowest resolution on his 4x device and thinks i have crappy images on my site?