Ad

How Can I Remove ?v=2222dddhh4 From Img Srouce In Shopify?

- 1 answer

How can I remove ?v=2222dddhh4 from img srouce in shopify ?

Main source:

I want:

<img src="https://cdn.shopify.com/s/files/1/1608/4177/files/Size_Guide.png>
Ad

Answer

using javacsript and jquery maybe help you:

$('img').each(function(){
 var _src = $(this).attr('src');//get attribute src
 _src = _src.replace(/\?v=.*?$/g,'');
 $(this).attr('src',_src);//replace your same img
 $('span').append(_src);//for test
});

jsfiddle

Ad
source: stackoverflow.com
Ad