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

Image true size doesn't respect size attributes #111

Open
joehoyle opened this issue Apr 12, 2021 · 2 comments
Open

Image true size doesn't respect size attributes #111

joehoyle opened this issue Apr 12, 2021 · 2 comments
Labels
bug Existing functionality isn't behaving as expected

Comments

@joehoyle
Copy link
Member

Steps to reproduce:

  1. Add a new image via Gutenberg
  2. Type in a custom size for the image. Here's one I made earlier:
  3. Save the post

Here's the image on the front-end:

The image attributes are outputted on the front-end, but it seems the image size (from tachyon) is using the image-size class from the image in precedence of the width/height attributes. This appears to mean it's not possible to insert an image (native size) into a page that isn't a registered image size. Given we can do that due to Tachyon, it seems like this should be supported.

Not sure how this is meant to work with responsive images though

I'd expect to see the native image size (downloaded file) matching the size that I had entered in Gutenberg.

@joehoyle joehoyle added the bug Existing functionality isn't behaving as expected label Apr 12, 2021
@roborourke
Copy link
Contributor

I think this is due to how it's figured out in Tachyon, with the size class taking precedence so might need to fix it there. To be honest it could be worth refactoring the whole Tachyon singleton class now that we have tests, it's a messy beast.

@joehoyle
Copy link
Member Author

@roborourke I'd suggest we just switch around that logic for now 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality isn't behaving as expected
Projects
None yet
Development

No branches or pull requests

2 participants