Page 1 of 1

Missing Image when a Retina Alternative is Added

Posted: Tue Jul 07, 2020 5:33 pm
by drooper
Hello All.

I have a page with a fixed header layout grid that is set to hidden.
The grid contains a .png image with a retina alternative.
This page is embedded on other pages within the project.
On these pages it is triggered by a bookmark with an onscrollhide/show with effect event.
As the page is scrolled down, the header fades in, but the image is missing.
It only appears when the screen is scrolled back to the top.

When the retina alternative is removed from the image, It works as expected.
As the page is scrolled down, the header fades in showing the image.

Any thoughts ?

Cheers.

*Post edited to remove links.

Re: Missing Image when a Retina Alternative is Added

Posted: Tue Jul 07, 2020 6:24 pm
by Pablo
The retina image is loaded by a JavaScript which monitors when the image comes into view (lazyload).
The onscrollhide/show event does the same thing, so the two scripts conflict with each other.

Maybe you can use a 'Picture' object instead? This does not use JavaScript to load the retina image.
http://wysiwygwebbuilder.com/picture.html

Re: Missing Image when a Retina Alternative is Added

Posted: Wed Jul 08, 2020 12:35 pm
by drooper
Thank you for your prompt reply Pablo.

As you suggested, using the Picture object with an adaptive image does the trick.

If I may point out though, it did previously work using WB14.

Cheers