- π¦πΊAustralia acbramley
This popped up in bug smash today. I'm not really sure how we'd go about fixing this, but it does seem like a fairly big edge case.
I'm not sure the db query idea would be viable for performance, it looks like flushing image styles in all stream wrappers has been a thing since D7 and probably earlier.
- πΊπΈUnited States generalredneck Texas, USA πΊπΈ
Yes it's an edge case, but with real world application on an education site i maintained.
My proposal was a single query per wrapper. I don't know how that looks in the code after 3 years, but I feel that the performance implications haven't been fleshed out. Also since it's been a problem since drupals in inception doesn't make it correct... But possibly an acceptable bug/problem.
At the very least we document and/report on the problem. Thoughts?
- π¦πΊAustralia acbramley
@generalredneck I agree, sorry if it sounded like I was discarding the idea that this could be a bug. We should definitely see if we can at least warn users. I just don't know where/how that could be done
- πΊπΈUnited States cmlara
to make a check against the database to see if any images are using the wrapper in the files_managed table.
Image styles may be generated for un-managed files as well (albeit not common), I don't see the files_managed table as a viable solution.
We should definitely see if we can at least warn users. I just don't know where/how that could obe done
We have had this subject come up for other issues in the past. Documentation has to start somewhere, this issue is as good as any other to do so, stick it somewhere in the README, or some "deployment guide" for Site Owners to note that '/styles/' is a reserved path on all streamWrappers.
Potentially a feature to be able to select where images styles may be located could be a solution.
β¨ Split ImageStyle into the config entity and a separate event-based image processing service Needs work would be the best for this, it would allow solutions for numerous concerns. The new FlushEvent it proposes likely could allow this to be handled per streamWrapper by later changing the streamWrapper spec to require each streamWrapper provider listen and perform the flush as needed.