• Resolved mgreis

    (@mgreis)


    Hi,

    I’m trying to specify the size of an image in a table cell. No matter what I do, the image is always square, though I want a landscape-style sizing.

    This is the img HTML I have in the table cell.

    <img src="https://www.greenneedham.org/blog/wp-content/uploads/2021/11/Tesla-Model-3-mjg-150x150.jpg" alt="" width="113" height="75" class="wp-image-14211" />

    When I inspect the image in the browser, I see this in the code:

    element.style {
    }
    .tablepress img {
    margin: 0;
    padding: 0;
    border: none;
    max-width: none;
    }
    .entry-content img, .comment-content img, .widget img {
    max-width: 100%;
    }
    img {
    max-width: 100%;
    height: auto;
    vertical-align: top;
    margin-bottom: 18px;
    }
    html :where(img[class*=wp-image-]) {
    height: auto;
    max-width: 100%;
    }
    * {
    box-sizing: border-box;
    }
    img[Attributes Style] {
    width: 113px;
    aspect-ratio: auto 113 / 75;
    height: 75px;

    }

    Is there a way to override this?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this likely is that the actually image you have chosen is the “Thumbnail” version, note the -150x150 in the image URL.
    If you remove that (or re-insert the image but choose the full size), the image should be shown correctly.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Image sizing within a table cell’ is closed to new replies.