[Resolved] Image with custom links displayed as small images

Home Forums Support [Resolved] Image with custom links displayed as small images

Home Forums Support Image with custom links displayed as small images

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #802900
    Stéphane Dupont

    Hello,

    I recently updated an existing blog that was using one of the standard WordPress themes to using Generate Press (premium) theme.

    All the old articles (and there are MANY, so manual editing them is not an option) have images clickable to enlarge them, but they all have been set to “custom link” (don’t ask me why…).

    That was working fine on the standard WP theme though, the image was displayed as a big image. But with Generate Press, the image is displayed as a really small image.

    Here’s an example: ###REMOVED_URL###

    How can I change that?

    Thank you,
    Stéphane.

    #802915
    David
    Staff
    Customer Support

    Hi there,

    if i click on that image it opens the full size image. Try clearing your browser cache.

    #803081
    Stéphane Dupont

    Yes, but before clicking, the image is very small.

    Previous theme was displaying this as a large image.

    In other words:
    – the image come from this article: ###REMOVED_URL###
    – when in this article you click on the image, as the image link has been set to custom link, it opens the image in a page where the image is very small.
    – indeed, clicking on it enlarge it, but the previous theme was displaying this full page

    #803112
    David
    Staff
    Customer Support

    Ah ok, try adding this CSS:

    .single-attachment .attachment img {
        width: 100%;
    }
    #803122
    Stéphane Dupont

    Nope, doesn’t work: the image is just upscaled by CSS but the actual size in pixels is still 300 pixels so it looks ugly.

    I checked by reactivating the old theme, was 1024 pixels before with the normal WP theme.

    #803286
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It’s possible that your previous theme was doing something custom to show the large image. GeneratePress just uses the default WordPress setting.

    Give this function a shot: https://gist.github.com/rfmeier/5753101

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #803742
    Stéphane Dupont

    Previous theme was a standard WP theme (Twenty Ten), so I don’t think so.

    If you want I can activate it a few minutes on the website if you want to check how it was behaving with the old theme.

    In any case, how can I fix this?

    #803748
    Stéphane Dupont

    Oh, didn’t the PHP code. Yes it works, thank you.

    #804185
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

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