Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full-sized GIF in floated image block won't resize properly #16362

Closed
jcklpe opened this issue Jun 29, 2019 · 3 comments
Closed

full-sized GIF in floated image block won't resize properly #16362

jcklpe opened this issue Jun 29, 2019 · 3 comments
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.

Comments

@jcklpe
Copy link

jcklpe commented Jun 29, 2019

Describe the bug

Image appears smaller in gutenberg editor but is larger when post is previewed before publishing.

To reproduce

  1. I insert a gif as an image block into a post, and set it to float right.
  2. I set the size of the image to Full Size because that is required in order to show the gif animation properly.
  3. I then set the image dimensions to 25%. This properly rescales the full sized animating gif within the gutenberg editor
  4. But when I hit preview the image is MASSIVE.

It also does not appear from checking the image styling in the inspector to be adding any additional styles based on size. I don't know why that is.

Expected behavior
I expect the gutenberg editor and the previewed post to both styled correctly.

Screenshots

image

image

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • Browser: firefox
  • Version: newest non nightly build.

Additional Notes:

  • This appears to only be an issue with gifs, as the jpegs properly resize. I checked with the "full sized" version of the jpegs just like with the gifs so I don't think it's the image version being used that's the issue.
@jcklpe
Copy link
Author

jcklpe commented Jul 1, 2019

To make this clear, this isn't a theme issue because this previously worked. There was some change in Gutenberg that broke this. What was that change?

The theme is also only calling post content, and there's no apparent styling on the relevant elements that is resulting in the default wordpress post content classes from doing their thing.

@swissspidy swissspidy added [Block] Image Affects the Image Block [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes. [Feature] Media Anything that impacts the experience of managing media Needs Testing Needs further testing to be confirmed. labels Jul 1, 2019
@talldan
Copy link
Contributor

talldan commented Mar 19, 2020

Hi @jcklpe. Thanks for reporting this. The issue was discussed during a triage meeting in the core-editor slack channel (the link will require a slack account if you don't have one - https://wordpress.slack.com/archives/C02QB2JS7/p1584597301019700).

A couple of us were unable to reproduce the issue. I'll close the issue for now. I realize some time has passed, if you're still experiencing the problem drop a reply in the issue and we can take a look into what might be happening.

@talldan talldan closed this as completed Mar 19, 2020
@talldan talldan removed the Needs Testing Needs further testing to be confirmed. label Mar 19, 2020
@jcklpe
Copy link
Author

jcklpe commented Mar 19, 2020

@talldan I figured out the basic problem and logged a bug on it here:
#18122
and here I suggested the solution.
#18276

There is at least one more link where I actually commented on the new code that was merged in that changed things, and had a discussion with the dev who implemented it and why and reading that might help provider further context.

Basically the issue had to do with a change in how floated images' html was wrapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.
Projects
None yet
Development

No branches or pull requests

3 participants