The introduction of the responsive product media image in wordpress 'srcset' attribute has started to interfere with the loading of product custom images in the woocommerce custom product image display screens.
To correct for this is simple as a short term solution :
1) load your favorite on-page or short-code Javascript editor as a plug in. I used : "OH Add Script Header Footer"
2) add the following code on the product or page on which you want to re-enable product custom imagesĀ
<script type='text/javascript'>
jQuery("img.wp-post-image").removeAttr("srcset");
</script>
-- this has re-enabled an essential feature on my pages.
Problem -- and simple solution.
The introduction of the responsive product media image in wordpress 'srcset' attribute has started to interfere with the loading of product custom images in the woocommerce custom product image display screens.
To correct for this is simple as a short term solution :
1) load your favorite on-page or short-code Javascript editor as a plug in. I used : "OH Add Script Header Footer"
2) add the following code on the product or page on which you want to re-enable product custom imagesĀ
<script type='text/javascript'>
jQuery("img.wp-post-image").removeAttr("srcset");
</script>
-- this has re-enabled an essential feature on my pages.
0 Votes
Deleted Agent posted over 7 years ago Best Answer
thanks
0 Votes
1 Comments
Deleted Agent posted over 7 years ago Answer
thanks
0 Votes
Login or Sign up to post a comment