Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7218 closed enhancement (worksforme)

Thumbnails and medium size should not be created on upload

Reported by: endolith Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords:
Focuses: Cc:


Currently, when I upload an image, it is saved to:


On upload, a medium-resized image is created and saved to a name like:


If I change my thumbnail or medium sizes in Settings --> Miscellaneous, this change is not reflected in the images already in the library, since they are only created on upload.

Instead, they should be created when needed for display, based on the size setting, and change when the size setting changes.

It would also be good if you could create a link to


, for instance, and instead of a "no posts matched your criteria", it would generate an image at that size on the fly.

Change History (4)

#1 @Otto42
10 years ago

-1 to all of this.

Creating for display means that PHP code must runs whenever the image is requested, which adds tons of overhead.

It also means that you get orphaned images lying around whenever you change things.

It also means that you are basically editing ALL your old posts just by changing a setting. Links would break unless you dealt with them, etc.

No, way too much. I think this should be a wontfix.

#2 @caesarsgrunt
10 years ago

-1. No, make that -10... for all the reasons Otto42 said.

I do think it would be nice if the files were called filename-thumb.jpg, filename-medium.jpg, and filename.jpg instead of having their sizes appended to them. That way a JavaScript in a theme or plugin could know from the url of an image where the other sizes were.

#3 @caesarsgrunt
10 years ago

Oh, wait... I think Otto42 and I both misunderstood. I did, anyway.

If all this was was that the first time a certain size was requested it was created and stored, that wouldn't be too bad. It would mean a lot of different sizes of the same image ended up sitting around, though.

#4 @jacobsantos
10 years ago

  • Milestone 2.7 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

If you remove the values in the thumbnail and medium or large image dimensions, then WordPress will not create those resized images.

Note: See TracTickets for help on using tickets.