craft-assetusage icon indicating copy to clipboard operation
craft-assetusage copied to clipboard

Feature Request: Don't mark "originals" as "unused" if there is a transformed copy if it

Open mizziness opened this issue 5 years ago • 4 comments

The plugin Plugin Resizer has a "non-destructive" option that creates a folder in each volume called "originals".

Desired Behavior:

User has the ability to ignore "originals" (or even whole folders when checking for unused assets.)

Current Behavior:

This plugin currently counts original files as "Unused" even if there is a generated "child" image. It would be ideal if "originals" files were only marked as Unused if they do not have a child copy currently in use.

mizziness avatar Jun 25 '20 18:06 mizziness

@mizziness this feels like misuse of the assets system, but i'm not familiar with that plugin. Do the assets keep any relation with the smaller images? If there is any relationship, i could use that to show usage numbers.

roelvanhintum avatar Sep 21 '20 08:09 roelvanhintum

@roelvanhintum I'm only a user of the other plugin, not a maintainer, so I don't know if a relationship is maintained. I would hope so, but I would hope a lot of things that aren't so.

mizziness avatar Dec 06 '20 20:12 mizziness

@mizziness Looking at their code, they don't keep any relation. This would mean an extra query for every asset to see if there is a file with the same name in originals. Also in the other direction when a file is in originals, the plugin should check one level higher. I'll put this on the roadmap.

roelvanhintum avatar Dec 07 '20 11:12 roelvanhintum

@roelvanhintum Let me know if I can be of any help!

mizziness avatar Dec 08 '20 05:12 mizziness