Skip to content

How does congo resize thumbnail images exactly? #771

Discussion options

You must be logged in to vote

Because the theme uses smartcrop by default. Here are the details. The easiest way to prevent this is to override layouts/partials/article-link.html.
Original part:

            class="w-24 rounded-md sm:w-40" srcset="
            {{- (.Fill "160x120 smart").RelPermalink }}
            160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x"
            src="{{ (.Fill "160x120 smart").RelPermalink }}"
            width="160"
            height="120"
          {{ end }}
          {{ if $.Site.Params.enableImageLazyLoading | default true }}
            loading="lazy"
          {{ end }}
        />

If you change the smart part to center in the code above, your problem will be solved.
modified v…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ItsSunnyMonster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants