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

Command icon 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

hkirsman created an issue. See original summary.

codebymikey’s picture

Work 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

codebymikey’s picture

Version: 8.x-2.6 » 3.0.x-dev
Status: Closed (outdated) » Active

Functionality has been merged for 2.0.x, but it still needs implementing for 3.0.x

codebymikey’s picture

Status: Active » Fixed

Added changes to 3.0.x

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • codebymikey committed 33c71b2e on feature/wp-scripts-packages-build
    feat: #3341296 SVGs should not use image styles
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.