Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a style of a not found media is requested, Drupal works for nothing !
I've added a test in fast_404 to avoid that work, and returning a 404 error if the original file doesn't exists.
Comment | File | Size | Author |
---|---|---|---|
#1 | fast_404_unfound_media_handling_2370331.patch | 944 bytes | cutesquirrel |
Comments
Comment #1
cutesquirrel CreditAttribution: cutesquirrel commentedComment #2
adammaloneWe should not be executing shell code from Drupal. Consider using the base_path function instead.
Similar functionality has made it into Drupal core with #927138: Fail image generation with 404 instead of 500, when source file is missing. I think the aim of this is to provide a faster 404 for non-present image derivatives although it seems like an edge case.