mad Thanks for the answer.
I'm not sure I follow the automad code completely but as this uses <srcset> without <picture><source> it appears the bulma hero create multiple images from a single image?
I'm not so concerned with the best image and file size for the device. That's a worthy goal but it's less than the ideal situation for me.
I'm aware a square image 'can' be cropped to portrait and to landscape but a better visual outcome requires different source images for landscape, portrait etc so the content creator can create an image that suits the different aspect ratio/device better.
Any way back to bulma, should I be able to isolate and use this piece of the bulma code (below) by itself ? (Apart any css of course) I've removed classes and the "active as I don't require a carousel.
<@ foreach in filelist @>
<div class="myClassHere">
<@ with @{ :file } { width: 1200 } @>
<@ set { ":small": @{ :fileResized } } @>
<@ end @>
<@ with @{ :file } { width: 1800 } @>
<@ set { ":medium": @{ :fileResized } } @>
<@ end @>
<@ with @{ :file } { width: 2400 } @>
<@ set { ":large": @{ :fileResized } } @>
<@ end @>
<img
class="myClassHere"
src="@{ :medium }"
srcset="@{ :small } 500w,
@{ :medium } 1600w,
@{ :large } 2400w"
sizes="(-webkit-min-device-pixel-ratio: 2) 50vw,
(min-resolution: 192dpi) 50vw,
(min-resolution: 2dppx) 50vw,
(-webkit-min-device-pixel-ratio: 3) 33.33vw,
(min-resolution: 288dpi) 33.33vw,
(min-resolution: 3dppx) 33.33vw"
alt="@{ :basename }"
/>
</div>
<@ end @>
I thought maybe if I provided the page with variables for 'small', 'medium' and 'large' and select images in the CMS for these variables it could work?...but I cant get it to work. It displays all the images at once.
.....So I tried something as simple as this below to see if it would work. If I inspect the images in the browser, they seem to be correctly pathed but they wont display in page
<picture>
<source media="(max-width:600px)" srcset="@ { imagePortrait }" >
<source media="(max-width:900px)" srcset="@ { imageSquare }" >
<source media="(min-width:900px)" srcset="@ { imageLandscape }" >
<img src="@ { imagePortrait }" alt="">
</picture>
So then I added the full image path. See below. Obviously this wont work on an actual template and on other pages but it works here locally and across devices ???
<picture>
<source media="(max-width:600px)" srcset="http://192.168.1.68:8006/automad-master/pages/02.products/01.homeware-collections/black-and-white/@{imagePortrait }" >
<source media="(max-width:900px)" srcset="http://192.168.1.68:8006/automad-master/pages/02.products/01.homeware-collections/black-and-white/@{imageSquare }" >
<source media="(min-width:900px)" srcset="http://192.168.1.68:8006/automad-master/pages/02.products/01.homeware-collections/black-and-white/@{imageLandscape }" >
<img src="http://192.168.1.68:8006/automad-master/pages/02.products/01.homeware-collections/black-and-white/@{imagePortrait }" alt="">
</picture>