[Resolved] Responsive image size in post

Home Forums Support [Resolved] Responsive image size in post

Home Forums Support Responsive image size in post

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #334959
    Roy

    Hi,
    The image in the post is in the same size in all screen sizes…
    How can I make the image size responsive? Isn’t it should be built in with the theme?

    The post link:
    http://ganof.rbwise.com/news/register/

    image Link:
    https://s11.postimg.org/7fbac8ng3/image.png

    #334989
    Leo
    Staff
    Customer Support

    Hi there,

    The image is responsive.

    It’s just that the image is smaller than the container width even when the smallest screen is used.

    You can use the hide-on-desktop hide-on-tablet hide-on-mobile classes if you want to insert different size of images at different devices?

    Let me know if this helps.

    #335001
    Roy

    Yes I understand…
    There is an option not to hide the image…maybe use media querys…?

    #335003
    Leo
    Staff
    Customer Support

    Yup you could do something like this:

    @media (max-width: 768px) {
        /* CSS in here for mobile only */
        .entry-content img {
            max-width: 200px;
        }
    }
    @media (min-width: 769px) and (max-width: 1024px) {
        /* CSS in here for tablet only */
        .entry-content img {
            max-width: 400px;
        }
    }
    @media (min-width: 1025px) {
        /* CSS in here for desktop only */
        .entry-content img {
            max-width: 600px;
        }
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #335052
    Roy

    awesome! great!

    #335335
    Leo
    Staff
    Customer Support

    Great!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.