WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#10531 closed enhancement (wontfix)

Intermediate image file naming scheme

Reported by: stephanreiter Owned by:
Milestone: 2.9 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 5 years ago.

Download all attachments as: .zip

Change History (3)

stephanreiter5 years ago

comment:1 azaozz5 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.

comment:2 azaozz4 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.

Note: See TracTickets for help on using tickets.