Sign in

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

  • This topic has 2 replies, 2 voices, and was last updated 1 month, 3 weeks ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8556
    Avatar photomuch.fun

    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
    },

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #8558
    Avatar photomuch.fun

    Thanks, Bob, that helped 🙂

     

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘how to ‘regenerate thumbnails’ as square image from landscape format’ is closed to new replies.