WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.36k stars 4.13k forks source link

Site Logo block options do not appear if SVG is selected (Firefox) #43130

Open coreyworrell opened 2 years ago

coreyworrell commented 2 years ago

Description

In Firefox, if you select an SVG image for the Site Logo block, the Settings panel disappears. You cannot set the image width, link to home, etc.

Step-by-step reproduction instructions

  1. Insert Site Logo block
  2. Upload/select an .svg file

Screenshots, screen recording, code snippet

JPG selected:

image

SVG selected:

image

Environment info

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

carolinan commented 2 years ago

SVG is not a supported file format for the logo. Until WordPress core officially supports uploading svg's securely, I think this needs to be labeled as a feature request, not a bug?

Related: https://core.trac.wordpress.org/ticket/24251

luminuu commented 10 months ago

Can confirm this is still a problem with Firefox. Does work with Chrome and Safari. I'd consider it as a bug, even if SVGs are not officially supported, but it does work in other browsers.

coreyworrell commented 10 months ago

@luminuu I've found that if the SVG does have both width and height attributes, then it works correctly in the editor. We also use the Safe SVG plugin.

t-hamano commented 9 months ago

I was also able to reproduce this problem. Furthermore, in Chrome, if you set an SVG image without width/height attributes as the site logo and then try to resize it, the icon disappears. The resizing issue does not occur with the Media & Text or the Image blocks.

This problem may be considered to be a problem specific to the Site Logo block.

https://github.com/WordPress/gutenberg/assets/54422211/c175c49c-1a94-4161-9a6d-93f7cc2ee2a0

diniciacci commented 1 month ago

I can confirm this bug as still present with WP 6.6.1. In particular I'm referring to the part also mentioned in #46784 about resizing of SVG not working. That part does not work in any browser.