How to encode “?” in image URL
-
Hey, I need to Remove query strings from static resources
Resources with a “?” in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:
A bunch of jpgs are listed, but to keep it simple lets just look at my profile picture on the main homepage (right widget):
https://i0.wp.com/www.chrisontour84.de/wp-content/uploads/2016/01/profile.jpg?w=192
This ? should be encoded with %3F and my question is how I can do that the best way? Within the widget code that generates the code above, I only included this:
<img src="https://www.chrisontour84.de/wp-content/uploads/2016/01/profile.jpg" class="aligncenter" width="192">
Now I can’t just go ahead and write this instead, it will result in the picture not showing up:
<img src="https://www.chrisontour84.de/wp-content/uploads/2016/01/profile.jpg%3Fw=192">
Can anyone tell me a quick fix for my ~25 images? Maybe it will improve the site speed..
Thanks!
CHrisThe page I need help with: [log in to see the link]
- The topic ‘How to encode “?” in image URL’ is closed to new replies.