Support » Fixing WordPress » Default image gallery resizing photos

  • I’ve used the default gallery [gallery columns="4"] – in my page post, and it places the photos nicely, everything works except

    somewhere it is resizing the photos. Thumbnails will be resized obviously, but I don’t want it to resize the full size images. Where do I turn that OFF?


Viewing 11 replies - 1 through 11 (of 11 total)

    You probably want to look at the size option

    Thanks for the reply.
    However, the link you’ve provided is for sizing the thumbnails on the page where all pictures are displayed. In the default gallery, I have attached the collection of pics to one post. Then I have put the [gallery columns="4"] code into the post which diplays all those attached pics.

    IF I then click on one of those pics – it goes to a separate page, where the pic I clicked on is supposed to be full size. In this case that would be 500×300 px. However the “full size” image is only 300x199px. It has been resized somewhere for the blowup. Any ideas where that resizing for the “full size enlargement” is happening?
    thanks again,

    Are you sure in the Image settings itself you have not resized the picture? Think that is the only place the sze can be changed. The gallery is simply calling the picture.

    The two settings for image size (other than thumbs) is
    max ht 450 max width 450 for “medium”
    max ht 1024 and max width 1024 for “large size”

    that’s why I don’t get where it’s getting this size 300 x 199 !! However, remember my point about the thumbnails and full size pics. The thumbnail size shows up on the “gallery” index page, and when one clicks on the thumb, it goes to a separate page where the “full size” pic that was uploaded is supposed to show. So that second page is calling the picture also, but it’s a different call than the gallery page.

    Have a link so can take a look?

    Yo, the link is here, this is the gallery page with thumbs, click on any thumb and you will see it 300×199 big, they were uploaded at 450×300.


    Sorry here’s the link:

    I don’t have a quick fix but What you probably need to do is make a template for that page.
    Make a copy of the Single.php from your theme. Call it whatever you want like fullsize.php
    Then where you see:

    replace that in between the PHP tags with this:

    if (wp_attachment_is_image($post->id)) {
    $att_image = wp_get_attachment_image_src( $post->id, "full-size");
    <img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>" class="attachment-full-size" alt="<?php $post->post_excerpt; ?>" />

    Make sure to put this template in your current theme directory and se it for that page. This is basicaly (use it for other reasons) what I have on a few sites but should do what you want. If you have a problem with it let me know.

    that is awesome, it certainly sounds like a quick fix to me, getting code that solves the problem!
    I’m going to try it and let you know. thanks a million!


    Was the cause of the problem identified? For the website I’m creating I actually want the gallery to link to a certain resize instead of the full-size image. (i.e. the problem jami had is the solution to my problem)

    I don’t have an example available, but the lightbox code which grabs the image links from the [gallery] tag grabs and displays the full-resolution file at a screen size. So all I need it to do is link to filename-800×600.jpg insted of filename.jpg, for example.

    I found a plugin that did what I needed–here’s a link here for future reference. running on 3.0.1

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Default image gallery resizing photos’ is closed to new replies.