Problem/Motivation
We implemented fix for SVG and images styles in https://www.drupal.org/project/gutenberg/issues/3205572
After the issue was fixed there was another suggestion by @codebymikey:
I believe a more robust way to address this functionality is to make use of the ImageStyleInterface::supportsUri method to ensure that the styles are only generated if the URI is actually supported by the style.
It'll avoid edge cases like .webp or .bmp file uploads breaking the site.Proposed resolution
Discuss if this makes more sense. Implement if needed.
Issue fork gutenberg-3341296
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
codebymikey commentedWork on this is being handled in #3415218: Normalize the gutenberg.settings config and support image sizes filtering, and relevant credit is being attributed to that issue instead
Comment #3
codebymikey commentedFunctionality has been merged for 2.0.x, but it still needs implementing for 3.0.x
Comment #6
codebymikey commentedAdded changes to 3.0.x