-
Notifications
You must be signed in to change notification settings - Fork 2
images not upscaling on viewport change #49
Comments
So the right images are generated by Betterthumbs but lazysizes doesn't change them? |
no. The thumbs are only generated when downscaling. By switching to bigger viewport no thumbs are generated with the second example. With the first example thumbs are generated and loaded. I will check with primed thumbs tommorow |
Ok just to be clear. Are the proper image urls rendered to the page? If you do this. <img {{ srcset(record.image, 'post') }}
{{ btsrc(record.image, 'post') }}
/> Are the right images rendered into the html? |
yes. the right images are rendered. And increasing the width or height doesn't create the bigger thumb, but reloading the page in the new size creates the thumb. |
hey @jemont I've tried to replicate your issue and I can't or I'm not understanding your issue properly ( I would actually go with that one haha).... Anyways could you do me a solid? Could you give me the following things and hopefully I can replicate it.
Thanks! For your reference here is my results using the extensions 'presets' that come prepacked with it
<h2>regular betterthumbs tags</h2>
{{ img(record.image, 'presets') }}
<h2>With Lazyload</h2>
<img sizes="100vw"
{{ srcset(record.image, 'presets') }}
{{ btsrc(record.image, 'presets') }} > Results: |
hi,
using the markup from the documentation with |
so it works if you don't use lazysizes? like the example I showed above without lazysizes? this one: <img sizes="100vw"
{{ srcset(record.image, 'presets') }}
{{ btsrc(record.image, 'presets') }} > If you use that example does it work? Remove lazysizes from the equation since that has nothing to do with this extension. Test it without lazysizes it what I'm saying |
ok, sorry to fast, it dosn't scale even without th data.
|
so this config: post:
save_data: true
lazyLoad: true
altText: ~
class: ['full-image lazyload']
widthDensity: 'w'
sizes: ['100vw']
modifications:
small: {'w': 480}
medium: {'w': 650}
large: {'w': 850}
xlarge: {'w': 1000}
xxlarge: {'w': 1200}
xxxlarge: {'w': 1600} with this markup: <img sizes="100vw"
{{ srcset(record.image, 'post' ) }}
{{ btsrc(record.image, 'post' ) }} > doesn't work. without the data-attributes right ? sorry for asking this so many times haha I just want to be sure since It should work the exact same as the |
in config setting lazyload: false and deleting the class lazyload doesn't change anything. |
ok. test without the |
ok i am blind. the problem is definitely with the data-sizes="auto" from the documentation example. |
so it works when you use <img sizes="100vw"
{{ srcset(record.image, 'post' ) }}
{{ btsrc(record.image, 'post' ) }} > right? |
yes. And it actually works with data-{{srcset}} too. The only thing that is screwing up, is the |
yeah that's a lazysizes problem which is why I told you this #44 (comment) because it says this https://github.com/aFarkas/lazysizes#markup-api when using data-auto for sizes. since this works and isn't an issue with the extension I'm going to close this now. If you come across another issue with it just reopen it ! Thanks ! |
sorry to insist
I am loading images via lazysizes.
when I use
{{ img( record.image, 'post' ) }}
smaller and bigger images are loaded, when the viewport changes.but using:
only new images are loaded when the viewport gets smaller (turning from landscape to portrait)
but bigger images are not loaded when switching to a bigger viewport
I tested both on the same page
The text was updated successfully, but these errors were encountered: