Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#49290 closed defect (bug) (fixed)

Add a link to the original image if it was scaled or rotated after uploading

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.3
Component: Media Keywords: has-patch
Focuses: Cc:

Description

There are several places where such link can be added. Seems it makes most sense in the Attachment Details sections in the media modal, media library and the individual Edit Attachment screens.

Attachments (4)

49290.diff (2.2 KB) - added by azaozz 5 years ago.
media-modal.png (92.9 KB) - added by azaozz 5 years ago.
media-lib.png (23.4 KB) - added by azaozz 5 years ago.
edit-attachment.png (41.6 KB) - added by azaozz 5 years ago.

Download all attachments as: .zip

Change History (9)

@azaozz
5 years ago

@azaozz
5 years ago

@azaozz
5 years ago

#1 @azaozz
5 years ago

  • Keywords has-patch needs-design-feedback added

In 49290.diff: add a link to the original image (when it exists) to the media modal "Attachment Details", to the individual attachment view in the media library (grid view), and to the Edit Attachment screen (see screenshots).

#2 follow-up: @joyously
5 years ago

There have been a lot of comments that say naming the attachment as -scaled messes up existing plugins or the plan of the person naming the image. Just having a link to the original is not that helpful. The image being used needs to have the original name, and the image not being used should have the suffix.
Does putting this link into the media details allow the user to choose the original where an image is being chosen? Or is it just for completeness?

#3 in reply to: ↑ 2 @azaozz
5 years ago

Replying to joyously:

There have been a lot of comments that say naming the attachment as -scaled messes up existing plugins or the plan of the person naming the image.

WP preserves the original image as uploaded, with the original name. However when that image is not suitable for web use (i.e. it is above the threshold), the largest size for web use is the scaled image.

Generally there were two options for naming of the scaled image: either use the existing pattern, -1200x800.ext (which would have made it with "variable" name like the sub-sizes) or to append a "static" string.

This is for the "web ready" version of the image suitable for use on the internet when the original image was above the threshold.

Does putting this link into the media details allow the user to choose the original where an image is being chosen? Or is it just for completeness?

You mean when inserting an image the editor? No, not in the editor as the image is not suitable for web use. Plugins that add functionality where an image can be chosen can decide if it makes sense for them to list the original image or not. The links added here are for cases where the users do not have such plugins but want to access the original image (to either download it or copy the URL to it, etc.).

#4 @karmatosed
5 years ago

  • Keywords needs-design-feedback removed

Whilst this adds elements to an already pretty crowded area, I think for the use case this makes sense. Let me remove the design feedback keyword so it can progress.

#5 @azaozz
5 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 47202:

Media: Add link to the original image in the image properties if it was scaled or rotated after uploading.

Fixes #49290.

Note: See TracTickets for help on using tickets.