Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

how to ‘regenerate thumbnails’ as square image from landscape format

  • #8556
    Avatar photo[anonymous]

    Hi,

    in my posts I use landscape images as featuredImages. Now I want to generate square thumbnails of these landscape images for a list of recent posts.
    I tried this in config.json:

    "featuredImages": {
    "sizes": "(max-width: 1200px) 100vw, 1200px",
    "dimensions": {
    "xx": {
    "width": 150,
    "height": 150
    },

    but the result is a smaller landscape format, not a square 🙁

    Thanks in advance, Michael

    #8557
    Avatar photoBob

    Set the crop parameter:

    "xs": {
         "width": 150,
         "height": 150,
         "crop": true
    },
    #8558
    Avatar photo[anonymous]

    Thanks, Bob, that helped 🙂