Add Link to Large Image in Add Media Window
|Reported by:||robertstaddon||Owned by:|
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.
Change History (12)
comment:5 in reply to: ↑ 4 SergeyBiryukov — 2 years ago
- Keywords ux-feedback added; needs-testing removed