Site logo

Archived topic

Image with custom links displayed as small images

8 replies · Started by Stéphane Dupont on February 6, 2019

Viewing posts 1–9 of 9

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.

Hi there,

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

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

Ah ok, try adding this CSS:

.single-attachment .attachment img {
    width: 100%;
}

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.

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?

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

You're welcome :)

This archived topic is closed to new replies.