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

Potential inline styling issue #68

Open
MiguelAxcar opened this issue May 10, 2022 · 1 comment
Open

Potential inline styling issue #68

MiguelAxcar opened this issue May 10, 2022 · 1 comment

Comments

@MiguelAxcar
Copy link

I just found a potential issue, and would like to report.

We included Gaussholder on our project, and two things happened:

First issue, original image had physical dimensions as width=599px and height=307px but this parameters weren't explicitly set for image on admin. Found that Gaussholder automatically included the inline styling style="width: 1px; height: 1px;" for this image, making the image to disappear on the frontend. This problem was fixed when I explicitly set width and height parameters for this image on admin. A suggestion for this case would be using image dimensions on this inline styling.

Second issue, original image was very big (4833 x 2355 pixels) and it was being used as an icon. The parameter width was being set to 50px on admin, but height parameter was missing. Found that Gaussholder ended up setting the image as 50x2355px, what made the image to be displayed incorrectly. A suggestion for this case, when we have only one of the parameters width or height explicitly set, is to get which one that is set and find out the image ratio, applying an appropriate value for the other parameter instead of the original image dimension.

I would try to find some time to open a PR for these issues.

@sambulance
Copy link
Member

The first issue Miguel mentions above is causing problems on one of our client projects, where we are seeing images disappear intermittently in Safari only. This has been reported to us a few times over the past few months and is becoming a pain point for the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants