• Resolved Syclone

    (@syclone)


    When I enable lazyloading in Smush it modified the src attribute to contain the placeholder data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==. As you know the placeholder is a 1×1 pixel, and so it caused all my images to occupy a 1×1 aspect ratio when not loaded. This causes elements to jump once they are lazyloaded into the page.

    I do not want to disable lazy loading, but I do want to maintain the aspect ratio of my images before they load on the page and prevent jerking.

    Yes, all images have width and height attributes, but the browser seems to be going by the 1×1 ratio regardless of the values I add to the width and height.

    How can I remove that 1×1 placeholder from my image src using PHP or prevent Smush from adding the 1×1 placeholder to the image src attribute in the first place?

    • This topic was modified 1 year, 8 months ago by Syclone.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove src placeholder added by Smush’ is closed to new replies.