How to remove the "?" and image sizes appended to uploaded images?

Posted in: Newsmag
Post count: 10

Hi everyone,

I’ve been trying to speed up my website as it scores poorly on GTMetrix and the other testing sites. They all recommend I optimize images even after I’ve already done so because the scan tools are finding the image names altered from what I uploaded.

To try and make things faster, I have edited images to the exact sizes I wish them to display. So every image is “full size.” Yet GTMetrix scans show the page loads with image filenames with characters after the “.jpg”. For example, a natively 600px image “/uploads/09/09/image-1.jpg” becomes “/uploads/09/09/image-1.jpg?w=600” once I upload it to the server. The added question mark and characters seems to trigger the “you need to optimize this image” flag on GTMetrix, even though the original file was optimized.

Can anyone recommend how I can stop “?w=600” from automatically getting added to the end of filenames once I upload? Can I have the filename be exactly what I type?

Thanks!

Post count: 9544

I’ve never seen ? added to a filename as that would not even work on a web server properly. That may be loaded as part of the URL to the image to indicate the size being loaded, but not part of file name.

Also good habit to start naming your images based on size … like
image1-600x450.jpg
image-about-puppies-640x480.jpg
090916-joe-announce-500x275.jpg

etc.

You might look at your actual files upload folder on your domain to see what the files are actually called, via FTP or your hosting account file manager.

I doubt ?=600 is being added to file names. Not happening on my sites running Newsmag.

If you are using some external plugin to auto-optimize images (photon, smush-it pro, etc) that would be an issue with that plugin and not the theme, btw.

(( I don’t work here … ))

Post count: 10

Thanks Chris, you are correct.

I did some more troubleshooting and with your guidance I started honing in on the plugins. Turns out it was the photon part of Jetpack that was doing it. I shut that off and the problem has been resolved.

My bad on that TagDiv, I did not know. Thanks Chris.

Post count: 9544

Heh. Been there. ?
Glad you got it sorted!

  • This reply was modified 9 years by simchris.
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.