Support » Plugin: WP Image Zoom » srcset added to random img tags

  • Resolved smit_ralph


    Hi Diana,

    You solved my issues just a few days ago, but I am sorry to say that since your last update I have a new issue:

    In my archive pages, the “srcset=” attribute is added to the pictures of some of the posts, seemingly random. These images are called using the_post_thumbnail() with a custom crpped thumb size. I did not in anyway add the ‘zooom’ class to these images, and they are not zoomable, but still they get this attribute.

    This should not even be much of a problem, but it changes the image height (the crop is no longer applied, it seems) and that screw up my grid.

    You can this here and here. Especially in that last one you can see only the second pic is adjusted. I replaced the pic, deleted the whole post and made a new one, emptied the browser cache, nothing works. It all should look like this page; a strict grid with all images of equal height…

    I really hope you can help… again.
    thanks in advance


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Diana Burduja


    Hello Ralph,

    the srcset attribute isn’t added by the WP Image Zoom plugin, but it’s coming from a WordPress core feature added in the 4.4 version. The WP Image Zoom plugin does indeed use the srcset attribute to find the biggest available image in order to zoom.

    If you uninstall for a moment the zoom plugin, is the problem still there?

    It seems to be solved for now. The scrset attribute still randomly appears on some smaller images, but (strangely) when I match their aspect ratio exactly to the thumbnail aspect ratio, or I make the pic bigger than the thumbnail, the added attribute has no visible effect on my site. So the issue still exists, but I know now how to fix it.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘srcset added to random img tags’ is closed to new replies.