Google PageSpeed is lowering my score because of the query string ?ext=.jpeg added to most of my images. The suggestion is to "Remove query strings from static resources"
Most of my image URLs look like this: Media/Images/Banners/Our-Approach.jpeg?ext=.jpeg
Is there any way to stop adding the query string? I can remove it in the media library but don't want to go thru 100's images manually.
It's weird that you have extension query parameter in non-permanent image URL, usually it is in permanent media files URLs(/getmedia/) and I think there isn't out of the box functionality to remove it. Using permanent URLs has a very big advantage (Responsive images in Kentico)
Anyway, to remove query parameter, you can create custom output filter where you will find image urls and remove the parameter Making custom modifications to output HTML
Maybe you could remove it in the transformation?
<% Eval("MyImage").ToString().Substring(0,Eval("MyImage").ToString().LastIndexOf("?")) %>
Whenever you are browsing media files from media libraries using page type at that time you can remove ?ext=.jpeg from media libraries URL then you will get media files without ?ext=.jpeg extension. You can try it from this way or you can also use transformation method whatever suggested by Laura.
Please, sign in to be able to submit a new answer.