PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 1, 2022

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

 July 01, 2022     shopify     No comments   

Issue

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>

Solution

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



Answered By - miglio
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing