Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 9 years ago

#10531 closed enhancement (wontfix)

Intermediate image file naming scheme

Reported by: stephanreiter's profile stephanreiter Owned by:
Milestone: Priority: high
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:

Description

Scissors is a plug-in of mine that allows cropping of intermediate images, e.g. thumbnails. Although this operation changes the dimensions of the image, I decided against changing its filename to reflect the new width/height in order to avoid breaking posts/links that reference the image via its old name. This causes an inconsistency between the file name and the actual contents.

Instead of appending {$width}x{$height} to the filename of intermediate images, I'd like to see the intermediate name appended, e.g. 'medium' or 'thumbnail' to resolve this issue.
Also, this would simplify retrieval of intermediate images because the database would no longer have to be queried to find the correct filename.

Attachments (1)

naming-10531.patch (2.1 KB) - added by stephanreiter 15 years ago.

Download all attachments as: .zip

Change History (4)

#1 @azaozz
15 years ago

Perhaps the proper way to handle this would be to leave the old image intact and save the new image as separate file, updating the attachment meta. This will keep everything working properly when the old image was already used in a post.

One of the feature requests for media is support for custom image sizes, i.e. more intermediate image sizes.

#2 @azaozz
14 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Replacing one image size with another and keeping the same name would make it display incorrectly as images are inserted in the post with width and height attribs.

#3 @DrewAPicture
9 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.