born05 / craft-assetusage

Craft plugin adds a column to see which assets are used or unused.
MIT License
32 stars 7 forks source link

Compatibility with Redactor and ethercreative/seo #39

Open philippe-leeroy opened 1 year ago

philippe-leeroy commented 1 year ago

It seems that the asset usage is not tracked in the wysiwyg (redactor plugin of craft cms) and in the ethercreative/seo for social image for facebook and twitter.

When you add an image in the redactor or in the social media, the image stays as "Unused" in the asset list.

If you delete the image, it remove the social image in the seo plugin and break the image in the redactor plugin...

craftcms: 3.8.5 redactor: 2.10.12 ethercreative/seo : 3.7.4

roelvanhintum commented 1 year ago

Unfortunately it would cause huge queries to support such fields, which would make asset overviews useless performance wise. It is documented in the readme. The only work around would be to cache the results of a background task that indexes all uses of each asset.

philippe-leeroy commented 1 year ago

Ooooh sorry, didn't see that in the readme.md...

It's pretty obvious!

Thank you for your prompt response.

philippe-leeroy commented 1 year ago

And for the work around, it's something we should do on our side...

Not sure to understand well.

roelvanhintum commented 1 year ago

Sorry i wasn't clear on that. This is a feature that we should build on the plugin's side. You are not the first one to report these kind of issues, so I really am considering to build this.

LinneaHarts commented 11 months ago

I was thinking about forking and building this, starting with Redactor. Was going to have a migration to store relations that aren't in the relations table, have it run a job to index all redactor fields on install, then update it whenever an element is saved. Also adding a utility to re-index if necessary. Curious if you've gotten a chance to work on this enhancement yet!