- This topic has 17 replies, 3 voices, and was last updated 7 years, 11 months ago by
Mr McMarry.
-
AuthorPosts
-
June 27, 2018 at 5:12 am #609715
Mr McMarry
Hello
when I visit the post page so the lazy loading image size is 640×480 which is been set by img size but i dont want that i want to make an img with the same size of <noscript> img means main img when the main image loads and the lazy load img take its place and then when main img is loaded so it just jump back which i dont like
Images :

and the lazy load img :
June 27, 2018 at 7:35 am #609815David
StaffCustomer SupportHi there, which lazy load plugin did you opt for? Is there not an option within that to define the auto sizing?
June 27, 2018 at 8:32 am #609955Mr McMarry
Nah BTW BJ Lazy Load
June 27, 2018 at 11:01 am #610056David
StaffCustomer SupportBeen looking into how to change the lazy load image size but couldn’t see an easy solution and the support for the plugin is non existent. You could always set your images to a max width of 640px, not ideal but would fix the issue.
June 27, 2018 at 12:03 pm #610097Mr McMarry
June 27, 2018 at 6:54 pm #610284Mr McMarry
This could help ?
June 27, 2018 at 8:04 pm #610326Tom
Lead DeveloperLead DeveloperI’m not seeing a jump? Is it happening on the home page?
Why not make the placeholder image the same size? Does it cause problems?
June 28, 2018 at 1:56 am #610498Mr McMarry
Every image has different height size width is 640 which is not a problem but height is a problem
June 28, 2018 at 4:40 am #610594David
StaffCustomer SupportI can’t see a way of getting the placeholder image to take on the size of the image that is yet to be loaded. It is a problem when image sizes vary. But as Tom says i can’t see the jump on most pages as it loads so fast.
Won’t fix the problem but may ease it is this article for fading them in:
https://davidwalsh.name/lazyload-image-fade
The attribute the lazy loader is using in your case is:
data-lazy-srcsetJune 28, 2018 at 5:11 am #610608Mr McMarry
Please correct me if i am wrong
Added :
CSS
img { opacity: 1; transition: opacity 0.3s; } img[data-lazy-srcset] { opacity: 0; }Javascript
[].forEach.call(document.querySelectorAll('img[data-lazy-srcset]'), function(img) { img.setAttribute('srcset', img.getAttribute('data-lazy-srcset')); img.onload = function() { img.removeAttribute('data-lazy-srcset'); }; });but nothing works opacity is still 0
June 28, 2018 at 6:49 am #610657David
StaffCustomer SupportI can’t see either the code on the site or the lazy loader images? Have you removed this function now?
June 28, 2018 at 6:59 am #610666Mr McMarry
Enabling Again
June 28, 2018 at 8:15 am #610828David
StaffCustomer Supporthmmm…. would need some re-coding, but looking at this method (sorry) it won’t work as it would effect the lazy placeholder image as well. May need to look for an alternative lazy load solution.
June 28, 2018 at 8:18 am #610829Mr McMarry
Np Lets make it Happen 🙂
June 28, 2018 at 8:49 am #610861David
StaffCustomer SupportI’ll let you know if i find any better solutions 😉
-
AuthorPosts
- You must be logged in to reply to this topic.