close
Skip to content

Adjust image editing naming schema #22580

@ajlende

Description

@ajlende

Follow-up from #21024 (comment)

I'm not that fond of the naming schema. crop-21-41-35-20-rotate-180-crop-21-41-35-20-IMG_20190825_104317-scaled-300x225.jpg doesn't sound particularly good (compared to IMG_20190825_104317-scaled.jpg) and will easily exceed the max file name length allowed on some filesystems.

If we had a reference to the original, unedited, image stored and we did the batched edits from #22579, we could better calculate a name for images. The order of operations is still important, so rotate-90-scale-300x255 is different from scale-300x225-rotate-90.

I like that the current implementation includes the unique edits that were made to the image so an edit doesn't have to be made if there's already a matching filename. It also has the benefit of making it easy, when browsing your media, to know which edits have been made if you had a couple different crops and were comparing between the two. A more reliable way to test for sameness could be to store an checksum of the image and compare against that instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    REST API InteractionRelated to REST API[Block] ImageAffects the Image Block[Feature] MediaAnything that impacts the experience of managing media[Type] DiscussionFor issues that are high-level and not yet ready to implement.[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions