• Resolved SFrueh

    (@sfrueh)


    Newest WP version, newest NG version, Twenty-Eleven Theme

    With NextGEN you can add a picture from one of your galleries directly into your post. I think everybody knows that!

    There has been a problem for years that on smaller screens (Smartphone) the pictures get distorted. We talk only about the picture directly added into a post, not about viewing the gallery itself.

    In my case the problem appears with diagonal photos, not with the vertical ones. A diagonal photo in an article will not be displayed proportional with the smartphone. The picture will be displayed as a square!

    For the last five years I did not care about this problem, because there was a simple solution.

    I just went into the style.css of my page and found this part:

    .wp-caption img {
    display: block;
    max-width: 98%;
    max-width: calc( 100% – 14px );

    I had to change it to:

    .wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;

    After doing this everything worked fine! After every theme update I had to do it again, because the theme-update changed the style.css back to normal.

    But after the latest update it does just not do the trick anymore.

    The style.css is now editor-style.css and there are new variables like margin.
    No matter if i delete the new variables or not:
    Changing the wp-caption img part to the good old….

    .wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;

    …. does not have any effect anymore ??

    When someone visits my page with a smartphone, all gallery pictures integrated into an article look like junk.

    What can I do to make them display proportional again?

    Greetings,

    SFrueh

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Imagely

    (@imagely)

    Hi @sfrueh,

    Could you please try using the below CSS rule that’ll set the height to auto and should fix the images’ distortion:

    .wp-caption img {
        height: auto !important;
    }
    Thread Starter SFrueh

    (@sfrueh)

    Hello @imagely ,

    it has no effect. No matter if I do….

    .wp-caption img {
    display: block;
    max-width: 100%;
    height: auto !important;

    …. or delete the other variables and just go with…

    .wp-caption img {
    height: auto !important;
    }

    … the pictures are still distorted.

    See our /category/konzertberichte for example. Thats a section where every single picture comes directly from a NextGEN gallery. All are still squares.

    Plugin Contributor Imagely

    (@imagely)

    Hi @sfrueh,

    Could you please add the rule that we’ve mentioned then ping us again here? I am wondering why it didn’t help when in fact it should since currently the reason why the block appears distorted is the static height that’s affecting the images on mobile because of the smaller width of the container compared to desktop.

    Thread Starter SFrueh

    (@sfrueh)

    @imagely ,

    I just found out that I have a editor-style.css AND a style.css. I added the !important to both of the files and now it is working again.

    Thank you very much, the problem is solved with this!

    Greetings,

    SFrueh

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Photos in post distorted when viewed with smartphone’ is closed to new replies.