Dear Mihaela:
I’m opening this up again as I just installed 2.5.0, which indicates that the srcset problem has been fixed for alternate URL paths.
Unfortunately, I’m still running into issues. Here’s the public version of the page running 2.5.0: https://bikesharemuseum.com/bikes/2017-ofo-fuji-ta/
The back-end code does appear to be detecting the various sizes, unlike before:
<img class="pic mwl-img lazyloaded" data-valign="middle" data-halign="center" alt="" data-full="https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2.jpg" title="" data-src="https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2.jpg" data-caption="" data-source="modula" srcset="https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2.jpg 1500w, https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2-300x200.jpg 300w, https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2-768x512.jpg 768w, https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2-1200x800.jpg 1200w, https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2-240x160.jpg 240w" sizes="(max-width: 1500px) 100vw, 1500px" mwl-index="1" src="https://media.bikesharemuseum.com/06-12-2019-ofo-dallas-2.jpg" style="inset: 0px auto auto -45.089px; width: auto; height: 180px; margin: 0px; max-width: 999em;">
According to Chrome’s inspector, $0.currentSrc is still referencing the full-size image. Note that it’s not picking up a 240×180 or 240×160 (some of these pictures are 16:9, not 4:3) sized image.
I checked the gallery setting and noticed the Image Size was set to “Custom,” so I set it to the Gallery-240 size I referenced earlier and re-saved the gallery.
It doesn’t stick. The image size in the settings reverts to “Custom.”
I decided to try a new gallery instead. One using all 240×180 images. Again, Modula defaulted back to “Custom,” on the back end. However, the images didn’t even show up on the front end for me. When I checked the inspector, I found very interesting code, as follows:
<img class="pic mwl-img" data-valign="middle" data-halign="center" alt="" data-full="https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2.jpg" title="2021-01-03-Stow-A-Bike-2" width="240" height="180" src="https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-240x180.jpg" data-src="https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-240x180.jpg" data-caption="" srcset="https://media.bikesharemuseum.com/-. 240w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-300x225.jpg 300w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-768x576.jpg 768w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-1200x900.jpg 1200w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2.jpg 1500w" sizes="(max-width: 240px) 100vw, 240px" data-mwl-img-id="2401" style="inset: 0px auto auto -29.336px; width: auto; height: 179px; margin: 0px; max-width: 999em;" mwl-index="1">
Note the blank srcset for the 240w entry. I’ve verified there is a https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-240x180.jpg
publicly accessible in the uploads directory.
Then, if I change the gallery to use the default thumbnail size:
<img class="pic mwl-img" data-valign="middle" data-halign="center" alt="" data-full="https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2.jpg" title="2021-01-03-Stow-A-Bike-2" width="300" height="225" src="https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-300x225.jpg" data-src="https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-300x225.jpg" data-caption="" srcset="https://media.bikesharemuseum.com/-. 300w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-768x576.jpg 768w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-1200x900.jpg 1200w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2-240x180.jpg 240w, https://media.bikesharemuseum.com/2021-01-03-Stow-A-Bike-2.jpg 1500w" sizes="(max-width: 300px) 100vw, 300px" data-mwl-img-id="2401" style="inset: 0px auto auto -29.336px; width: auto; height: 179px; margin: 0px; max-width: 999em;" mwl-index="1">
So, if anything, even though the back end’s dropdown indicates “Custom,” the function does seem to be working at least, but the correct image file name isn’t being generated. At least, this is the case for the new, from-scratch gallery.
Any insights as to what’s going on?
-Kurt