#21114 closed enhancement (duplicate)
Add Link to Large Image in Add Media Window
Reported by: | robertstaddon | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4 |
Component: | Media | Keywords: | has-patch ux-feedback |
Focuses: | Cc: |
Description
Usually when an image thumbnail is inserted into a post, I would like the thumbnail to link to the large version of the image, not the full size version. Often the full size version is straight from a user's high-megapixel camera and takes a while to load, while the large version has been automatically downsized by Wordpress according to its media settings and works beautifully with a lightbox plugin or script.
Wordpress automatically creates a large version of the image, but unfortunately it does not support linking to the large version very easily at all from the Add Media window. This patch adds the option to link to either the Full Size Image or the Large Image from the Add Media window.
I've used the attached patch to the Wordpress core ever since the version 2 era. I thought I'd try submitting it as an enhancement so I that I won't have to keep manually applying it every time that I upgrade Wordpress.
One note: The line that says "$url = $fileLarge;" makes the large file the default link for an image. This may be too drastic of a change for Wordpress. However, most of my clients would vote that it should be the default, so I thought I'd try submitting it anyway. :) If other people disagree, then I could certainly remove that line of code so that the large image would be an option but not the default option.
Attachments (5)
Change History (12)
#3
@
12 years ago
I thought I'd try submitting it as an enhancement so I that I won't have to keep manually applying it every time that I upgrade Wordpress.
It's also currently possible to turn your patch into a plugin (add-link-to-large-image.php), so you don't have to edit the core file.
#4
follow-up:
↓ 5
@
12 years ago
Wow, Sergey, thank you so much for writing that plugin! Beautifully written. It will be a real help.
Perhaps I should release your plugin publicly before suggesting a patch to the Wordpress core. Somehow, though, I still think that this would be a really helpful addition to Wordpress. What do you think? The above +1 from knutsp seemed to reinforce this idea. I've rewritten the patch with your updated plugin code and also disabled the "Large Image" button if it is the same as the "Full Size" image.
What do you think about media.php.2.patch?
Thank you again!
#5
in reply to:
↑ 4
@
12 years ago
- Keywords ux-feedback added; needs-testing removed
Related: #19181 (suggests a filter for image_link_input_fields()
).
Replying to robertstaddon:
Perhaps I should release your plugin publicly before suggesting a patch
Sure, go ahead. Glad you liked it.
What do you think about media.php.2.patch?
A change like this needs UX feedback. I've attached the screenshots after the patch.
#6
@
11 years ago
I tried but it doesn't work with WP 3.5.1.
Should it be possible to get a compatible version for WP 3.5.1 ?
Dimitri
+1
This a practical problem for me and clients. As the ticket author wants, I usually want to link to the large image and not the full size from camera. The full size will often be too large for a normal screen resolution, the resolution higher then needed on the web. I don't want to always have to resize the image in WordPress, or before upload, lazy as I am. This would be a nice enhancement.
Patch should make the users latest choice as the default for the next insert.