And the image gets a data-src when loaded, where the image path is good. But the image does not render on the page. Note: The image in in a Bootstrap Accordion in the .panel-body container. I can make the image load by resizing the browser windows. I think this has to do with, that Slimsy is not happy about images being hidden on the page. Does anyone have a fix for this? Thanks in advance :)
You'll probably want to call the window.slimmage.checkResponsiveImages(delay) js method when the image is revealed to get slimmage to do it's calculations:
Thanks Matt. I have tried to do so now. This is the code:
$("#accordion").on("shown.bs.collapse", function () {
window.slimmage.checkResponsiveImages(1);
});
Unfortunately, the Webconsole in Firefox says that "window.slimmage.checkResponsiveImages();" is not a function, even though slimsy is included and is working...
PS: Suddenly found this thread which I the basis for the above script.
Images not rendering in Bootstrap Accordion
Hello! I have some pictures stored in an Archetype, and I retrieve them like this:
And the image gets a data-src when loaded, where the image path is good. But the image does not render on the page. Note: The image in in a Bootstrap Accordion in the .panel-body container. I can make the image load by resizing the browser windows. I think this has to do with, that Slimsy is not happy about images being hidden on the page. Does anyone have a fix for this? Thanks in advance :)
Hi Andreas,
You'll probably want to call the window.slimmage.checkResponsiveImages(delay) js method when the image is revealed to get slimmage to do it's calculations:
https://github.com/imazen/slimmage#slimmage-callable-api-methods
Hope this helps
Matt
Thanks Matt. I have tried to do so now. This is the code:
Unfortunately, the Webconsole in Firefox says that "window.slimmage.checkResponsiveImages();" is not a function, even though slimsy is included and is working...
PS: Suddenly found this thread which I the basis for the above script.
is working on a reply...