• Resolved balma01

    (@balma01)


    Hi,
    I’ve added a featured image to my posts but irrespective of the image size, the image is always cropped and not scaled correctly.
    Why ?
    Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Thanks for using Period!

    The Featured Images are cropped to fit the allotted space if they are either too wide or tall. If both the width and height are smaller than that space, the image will be scaled until it fills the space available. If the image is scaled, it is always done so proportionately without affecting the native aspect ratio of the image.

    Thread Starter balma01

    (@balma01)

    Hi Ben and thanks.
    Something strange is happening:
    in this
    I’m using a small image 225 x 225 but, as you can see, it is cropped like it was a wide image. I do not understand Why…

    Theme Author Ben Sibley

    (@bensibley)

    Okay I see. Please add this CSS to turn off the scaling of the Featured Images:

    .featured-image img {
      object-fit: none;
    }

    You can copy & paste that code into the “Additional CSS” section in the Customizer (Appearance > Customize), and it will take effect right away.

    Thread Starter balma01

    (@balma01)

    Hi Ben
    it works inside the posts but in the blog home page tha images are always cropped like it was a wide image

    Theme Author Ben Sibley

    (@bensibley)

    Please switch to this updated snippet instead:

    .featured-image > img,
    .featured-image > a > img {
      object-fit: none;
    }
    Thread Starter balma01

    (@balma01)

    Yes. It works.
    Thanks

    Thread Starter balma01

    (@balma01)

    Ben.
    the problem is solved as I wrote.
    There’s another strange behaviour: if I copY a post link into linkedin, here the featured image is still cropped like it was a wide image.
    It seems a linkedin problem but copyng another post from another blog that uses Period, the problem does not exist.
    What do you think about it?
    Thanks again
    MB

    Theme Author Ben Sibley

    (@bensibley)

    The image from the other site using Period is likely larger or better fits the aspect ratio LinkedIn uses. I think if you upload a larger version or perhaps a wider version of the image, LinkedIn may not resize it.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘featured image’ is closed to new replies.