Edit media.php in the wp-includes directory.
The line number 394 is as follows in 2.6:
$link = wp_get_attachment_link($id, $size, true);
change it to:
$link = wp_get_attachment_link($id, $size, false);
and it should work! Let me know if that worked for you.
It does work! THANK YOU!
It was on line 450.
Is there anyway to make the link open in a new window? 😀
Are you just linking directly to the image or or an actual HTML file?
Hmm, this didn’t seem to work for me. I’m trying to link to an external URL and it continues to actually save the link to the file every time, no matter how many times I go back and re-save it.
When I do do this
$link = wp_get_attachment_link($id, $size, true);
change it to:
$link = wp_get_attachment_link($id, $size, false);
It makes my thumbs in the post go to .jpg files instead of the post page.
I want to insert [gallery] but have thumbs go to the page with the pic on it (which is a medium size picture), and when you click the med picture I want it to go to the URL I specified. Anybody figure this out yet? I am using Version 2.6.2
I’m also having this problem in WP 2.7 the new line looks like this
$link = isset($attr[‘link’]) && ‘file’ == $attr[‘link’] ? wp_get_attachment_link($id, $size, true, false) : wp_get_attachment_link($id, $size, false, false);
I changed it to :
$link = isset($attr[‘link’]) && ‘file’ == $attr[‘link’] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, false, false);
but still no luck. WP won’t save the link I set for the image..
Any thoughts on this? Alternate solutons?
Scott