• Resolved Seppelicous

    (@seppelicous)


    Hi,
    the WP Gallery always links to the “full”-size of the image. The attribute “size” is used to set the size of the thumbnais.

    I am uploading images with about 3000px-4000px to keep high-res images for retina dispalys. There is no way to set the WP gallery image size to a maximum resolution.

    Is there any way to do this with MLA? I checked the help, but I did not find anything.

    regards,
    Sebastian

    http://wordpress.org/extend/plugins/media-library-assistant/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Sebastian,

    Thanks for this question. You can use the link= attribute to link to a different image size. Here’s the relevant section of the Documentation:

    Link

    The Link parameter specifies the target for the link from the gallery to the attachment. The default value, “permalink” (or its synonym “post”), links to the attachment’s media page. The “file” and “full” values link directly to the attachment file.

    For image attachments you can also specify the size of the image file you want to link to. Valid values include “thumbnail”, “medium”, “large” and any additional image size that was registered with add_image_size(). If the specified size is not available or if the attachment is not an image, the link will go directly to the attachment file.

    You can find the valid size values for images in your Media Library by scrolling thru the “Attachment Metadata” box on the Edit Media screen. The link attribute is restricted to registered size values because those values refer to image files WordPress generates when the image is uploaded; you can only link to an existing file.

    I hope that gets you what you need. If you have any problems with the link attribute or further questions, let me know.

    Thread Starter Seppelicous

    (@seppelicous)

    Thanks, but I like to use fancybox or lightbox and have to link to the file, not to the attachment page.

    Plugin Author David Lingren

    (@dglingren)

    That’s not a problem. If you code something like link=medium you get a link to the file, not the attachment page. I’ve done that with Shadowbox JS, for example. If you can’t get it to work, give me some more information and I’ll try to help.

    Thread Starter Seppelicous

    (@seppelicous)

    Hm, no its not working. 😞
    This is the code I use:

    [gallery link="medium" type="rectangular" ids="1146,1145,1144,1143,1142,1141,1140,1139,1138,1137,1136,1135,1134,1133,1132,1131,1130,1129,1128" orderby="rand"]

    And the link to the Gallery:
    http://www.ilikephotos.de/blog/shooting-mit-carlo-und-jochen/

    I am using fancybox for wordpress.

    Thank you so much for your help!

    Plugin Author David Lingren

    (@dglingren)

    Well, the quick answer is that the code you’ve given above uses the [gallery] shortcode, not [mla_gallery]. The WordPress standard [gallery] does not support link=medium; you have to use [mla_gallery].

    The longer, more disappointing answer is that type=rectangular implies that you’re also using the WordPress.com Jetpack plugin to compose the “Tiled Mosaic” gallery. Jetpack is great, but it doesn’t support link=medium either (that is why the link defaults back to the attachment page). Since Jetpack is composing your gallery, there is no way that ‘[mla_gallery]’ or any other part of the MLA plugin can change the files the gallery links to.

    I think you are stuck – I can’t think of any way to get Jetpack to link to anything other than the “Attachment Page” or the “Media File”. I’m sorry I do not have better news.

    Thread Starter Seppelicous

    (@seppelicous)

    Oh thanks, I thought this also works with the native gallery 😀

    I really like the tiled gallery, and like keep using it. So I asked the jetpack-support for help – maybe there is any update in the future.

    Thank you for your help!!

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

The topic ‘Gallery link to a specific size?’ is closed to new replies.