Skip to content

Potential inline styling issue #68

Description

@MiguelAxcar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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