WordPress.org

Ready to get started?Download WordPress

Forums

Default image gallery resizing photos (12 posts)

  1. jami1955
    Member
    Posted 3 years ago #

    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?

    thanks
    JSC

  2. webjunk
    Member
    Posted 3 years ago #

    http://codex.wordpress.org/Gallery_Shortcode

    You probably want to look at the size option

  3. jami1955
    Member
    Posted 3 years ago #

    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 500x300 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,
    JSC

  4. webjunk
    Member
    Posted 3 years ago #

    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.

  5. jami1955
    Member
    Posted 3 years ago #

    The two settings for image size (other than thumbs) is
    max ht 450 max width 450 for "medium"
    and
    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.

  6. webjunk
    Member
    Posted 3 years ago #

    Have a link so can take a look?

  7. jami1955
    Member
    Posted 3 years ago #

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

    thanks,
    JSC

  8. jami1955
    Member
    Posted 3 years ago #

    Sorry here's the link:
    http://osholeela.net/?p=95

  9. webjunk
    Member
    Posted 3 years ago #

    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:
    the_content();

    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.

  10. jami1955
    Member
    Posted 3 years ago #

    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!

    JSC

  11. taihw
    Member
    Posted 3 years ago #

    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-800x600.jpg insted of filename.jpg, for example.

  12. taihw
    Member
    Posted 3 years ago #

    I found a plugin that did what I needed--here's a link here for future reference.
    http://wordpress.org/extend/plugins/gallery-plus/ running on 3.0.1

Topic Closed

This topic has been closed to new replies.

About this Topic