• Resolved Mandy Jones

    (@mandy-jones)


    Hi there
    Is it possible to change the image size on the attachment pages? They seem to default to quite a small size. The visitor has to click on the image to see the original size.

    I would like them to show on the attachment page as the original size.

    Example attachment page: https: // www. wildcatfamily .com / felidae-family-classification / felidae-lower-classifications/

    Please remove spaces – I have just formatted the link like this otherwise I get a lot of spam.

    Many thanks
    Regards
    Mandy

    • This topic was modified 7 years, 5 months ago by Mandy Jones.
    • This topic was modified 7 years, 5 months ago by Mandy Jones.
Viewing 15 replies - 1 through 15 (of 17 total)
  • hannah

    (@hannahritner)

    Hey Mandy,
    How are you adding the images? When adding you should see an option under Attachment Display Settings to choose the size (thumbnail, medium, large, fullsize). Let me know if that’s not the case for you!

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hi Hannah

    When I add the image to the page I say Full Size.

    The page where the image is inserted is https:// www .wildcatfamily.com / felidae-family-classification/

    Regards
    Mandy

    • This reply was modified 7 years, 5 months ago by Mandy Jones.
    hannah

    (@hannahritner)

    If you were to use a full width page layout, rather than a sidebar layout your images would show larger. As it is them seem to be taking up the full width of the allotted space.

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hi Hannah

    I am talking about the size of the image on the attachment page (ie the media / image page) not on the content page.

    https://www.wpbeginner.com/glossary/attachment/

    felidae-family-classification/ is the content page and
    felidae-family-classification / felidae-lower-classifications/ is the attachment page of the image.

    Google is indexing attachment pages and I am getting visitors arriving via the attachment pages so I am trying to make them look better.

    Regards
    Mandy

    hannah

    (@hannahritner)

    Do you mind sending a screenshot of what you’re referencing? https://postimage.io/
    Thanks!

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Here it is – I have given you the url of the attachment page already.

    https://postimg.org/image/6i7xpz679/

    Here is a good article explaining what an attachment page is:
    https://www.hongkiat.com/blog/wordpress-attachment-pages/

    Regards
    Mandy

    hannah

    (@hannahritner)

    Try adding this to your custom css box in Theme Options > Custom CSS:

    img.attachment-medium.size-medium {
        max-width: 800px;
        width: 100%;
    }
    .postclass.pageclass.clearfix.entry-content {
        text-align: center;
    }

    Does that work for you?

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hi Hannah
    No I’m afraid the image size still looks the same. I purged cache and tried in Chrome and Firefox and from within WordPress but all still show the small image.

    I have left the code in, in case you can debug it.

    Anything else I can try?

    Many thanks
    Mandy

    hannah

    (@hannahritner)

    I’m not seeing the css in your code. Where are you adding it?

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hi Hannah
    Sorry, I added in a comment and commented out the code as well by mistake. I fixed it but:

    1. The image is large now but it is low resolution and ‘blurred’ – you can preview the same url.

    2. All the text on my site went centered so I commented out the postclass statement.

    /*2017-07-03 Size of image on attachment pages*/
    img.attachment-medium.size-medium {
    max-width: 800px;
    width: 100%;
    }
    /*.postclass.pageclass.clearfix.entry-content {
    text-align: center;
    }*/

    Regards
    Mandy

    hannah

    (@hannahritner)

    1. The image you’re uploading is quite small, so if you’re wanting it not to stretch you would need to upload a larger image.

    2. Sorry, try this css instead:

    .attachment .postclass.pageclass.clearfix.entry-content {
        text-align: center;
    }

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hannah
    The image is quite large. If you click on the image you will see the full size – that is how I want it to show on the attachment page, without the visitor having to click on it.

    The theme is reducing the image size on the attachment pages, it is not something I can set, hence this query.

    Regards
    Mandy

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hi
    I found this article: https://zolahost.com/change-wordpress-attachment-page-image-size/
    which says:
    Medium size is the default value of attachment page image size in WordPress.
    Step 1 : Edit “post-template.php” file from “wp-includes” folder
    Step 2 : Find this code wp_get_attachment_link(0, ‘medium’
    Step 3 : Change the default value medium to full or large
    Step 4 : Click save or update to save this changes. Attachment page image size will be changed immediately once you have done this update.

    I think that your suggestion is trying to display a medium size image at a larger size, instead I think we need to actually change the default size to ‘full’?? Is it possible to do this in the custom css code without changing the php files?

    Thanks.
    Mandy

    hannah

    (@hannahritner)

    When you add an image from the Add Media button in your edit page, on the Insert Media popup you should see on the right side Attachment Details and then Attachment Display Settings. Under that, you can set the size to full. Does that work for you?

    Hannah

    Thread Starter Mandy Jones

    (@mandy-jones)

    Hannah
    It is set to Full Size as mentioned in an earlier reply.

    Can someone else in your team help perhaps with this?

    Regards
    Mandy

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Attachment image size’ is closed to new replies.