Skip to content

SVG image is not displayed correctly in Site Logo admin menu after resizing #80141

Description

@BlackStar1991

Description

I discovered an bug that when you set an SVG image (that was optimased) as an image for the Site Logo block, and then start changing the width of the image in the admin, it stops displaying it.

Image

For exapmle image.

Image

*this element don't have width height after optimisation

Step-by-step reproduction instructions

  1. Install any plugin that allows you to display SVG elements for your WP site.
  2. Choose any SVG image and optimize it to remove unnecessary garbage. Example using SVGO
  3. Try to add this svg image to your Site Logo component.
  4. Try to change Image width in this Settings of Compont

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions