Skip to content

Allow to customize image fit in gallery component from achievements section #994

@juan11iguel

Description

@juan11iguel

As it stands, the default background-size property from the gallery component in the achievements section, which is set to cover, is the only fit option for images. Which makes images look wrong more often that not:

Screenshot from 2024-10-04 12-45-19
Screenshot from 2024-10-04 12-45-35

Quick solution

A quick fix could be to expose an option in the template to setup how images should be fit, to allow for example the contain setting:
Screenshot from 2024-10-04 12-48-28

It is not ideal, but at least images look correct.

Better solution

Ideally, maybe the gallery component could be replaced by a smarter one? One that would create a grid based on the ratios of the images it is given. This is how it works for example in hugo-theme-gallery, which in my experience makes images look good in a very wide range of ratios and formats you throw at it.

Screenshot from 2024-10-04 12-59-03
image

Thanks for the project!
Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions