dariodev
Member
Posted 1 year ago #
When you insert image into post there is option to link this image to larger image, but this larger image is always full-size of uploaded image. There is no option to choose size of target image. Is there some plugin or modification to make images linked to "large" ("large" is set in media settings) versions of images instead of full-size?
How large is your uploaded image and what are the dimensions of your Large image in Settings -> Media?
I believe if you set the insert to Post URL (using attachment page) instead of File URL then it'll be whatever size you've set it to.
dariodev
Member
Posted 1 year ago #
Dimensions of Large image in Settings -> Media is Max Width 1024 and max Height 1024. When I upload larger images (eg.1600x1200) wordpress will upload this image and will create 3 more images; thumbnail, medium and large - as set in Settings -> Media. This far is ok.
But, when you insert image into post and link this image to larger image you cannot choose size of this larger image - this larger image is not "Large" from Settings -> Media - this larger image is full-size of uploaded image. I need to find solution to make thumbnails (or wp-gallery images) link to "Large" versions of images instead of full size.
Joseph is correct. For the default gallery, you'll need to add some extra options to the gallery shortcode:
[gallery link="file"]
http://codex.wordpress.org/Gallery_Shortcode
dariodev
Member
Posted 1 year ago #
dariodev
Member
Posted 1 year ago #
Esmi, if you refer to something like this [gallery link="file" size="medium"] this is not the answer because this will create gallery of Medium sized images but target files will be full-size images, not the Large.
Just to clarify, in case anyone is confused, the size I was referring to is the size set when inserting into a post, not the sizes in media setting.
@dariodev
If you always want it to link to the large size image then you'll need to somehow add the dimensions to the end of the image filename in the URL.
Perhaps there's a filter hook that can be used?
perywinkle
Member
Posted 1 year ago #
I'd be interested in a solution for gallery shortcode linking to 'large' images not 'full'.
WP makes a large, why not use it?
Or even a custom defined size via the post-thumbnail feature.
My users will be uploading gigantic files... so 'full' is not a option.
It would be nice is there were something like this:
[gallery link="file" attachment="full"]
jaumesala
Member
Posted 1 year ago #
I think its a great idea.
Or even more a place in wordpress where you can set up de defult [gallery] options
link= file | atachement
attachement= thmubnal|medium|large|ful
Then you will not have to put the code for each [gallery]
attachment.php looks like an answer
If you make one, your attachments would be shown on it
http://themeshaper.com/2009/06/30/wordpress-theme-single-post-post-attachment-404-templates-tutorial/
Has some info on it.... you would just need to call in the appropriate image size on an attachment.php template
jaumesala
Member
Posted 1 year ago #
Sorry, I think I'm not undertanding.
the attachment.php relies on theme or in wordpress core files?
perywinkle
Member
Posted 1 year ago #
That's a theme file.
If you create a attachment.php, in your theme directory, it will display for attachments in a more customized way. 'image.php' even more specifically.
http://codex.wordpress.org/Template_Hierarchy
jaumesala
Member
Posted 1 year ago #
I recived you respons by email.
Thank you
stueynet
Member
Posted 1 year ago #
This is very important for us purists that like using the gallery shortcode. You cannot use attachment.php if you are trying to link to the file. I agree with Mic's solution
[gallery link="file" attachment="full"]
If anyone has any ideas let me know. This can probably be done with a custom function / filter.
stueynet
Member
Posted 1 year ago #
Just found this plugin. Does exactly this and a lot more.
http://wordpress.org/extend/plugins/cleaner-gallery
jaumesala
Member
Posted 1 year ago #
I will take a look to the plugin.
I think in de [gallery] code WordPress can make a better job.
jefflundberg
Member
Posted 1 year ago #
I've been looking for a solution to the same issue. I wanted users the ability to upload full size images (4000px wide, for example), but when they inserted the image into their post, I wanted the image to link to the large size, instead of the full size. I used a filter to modify the admin screen using the attachment_fields_to_edit hook.
Details here:
http://posterous.jefflundberg.com/make-wordpress-image-link-to-large-image-inst
evster
Member
Posted 7 months ago #
Just want to note that I too was looking for this EXACT feature.
Something along the lines of [gallery link="file" attachment="large"] would be great!
I want to have my gallery thumbnails link to the WordPress auto-generated "large" image instead of the original full-sized image that was uploaded, but there does not seem to be an easy way to make this happen.
cjldragon
Member
Posted 7 months ago #
photocurio
Member
Posted 7 months ago #
Wow, nice work, C. J. L. Dragon! That's perfect.
cjldragon's php script from his link helps Me too.
tbradley22
Member
Posted 7 months ago #
Wow yeah cjldragon's functions.php script was perfect. I just dropped it in and worked right form the get go.
jaumesala
Member
Posted 7 months ago #
Is there a way to make this code
[gallery file=link]
As wordpress default Code for galleries, instead of
[gallery] wich results in [gallery file=attachement]
Maybe this question is a bit out of topic
Really thank you