Original images linked when using [gallery] instead of edited images.
|Reported by:||materdaddy||Owned by:|
When using the built-in [gallery] in WPMU, any images you've edited using the built-in "media" editing will have anchors that point to the original image rather than the edited image.
Steps to reproduce:
- Upload images to a post.
- Rotate an image and save.
- Use [gallery link="file"] in your post.
Gallery shown in your post with the edited images, clicking one should show the full sized edited file.
Gallery is shown in your post with the edited images, however clicking one results in a link to the original (non-rotated) images.
wp-includes/post.php - function wp_get_attachment_url()
There is a section of code commented out for MU that says it breaks the image upload path for MU. This is untrue: The "elseif" check on wp-content/uploads will evaluate false, then the "else" will just concatenate the upload's baseurl to the filename resulting in a correct URL if it weren't commented out.
Because that section of code is commented out, the "$url" variable is still empty after that if block, and the guid is used instead, which apparently is the unaltered original image.
- WPMU 220.127.116.11
- Apache2 2.2.11(Ubuntu)
- PHP 5.2.6-3ubuntu4 with Suhosin-Patch 0.9.6.2
- uname: Linux 2.6.30-rc6 #2 PREEMPT Wed May 20 05:42:04 MDT 2009 armv5tel GNU/Linux
- mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (arm) using readline 5.2
Change History (4)
- Keywords multisite added; gallery wpmu removed
- Milestone changed from Unassigned to 3.1
- Resolution set to fixed
- Status changed from new to closed
- Summary changed from WPMU: Original images linked when using [gallery] instead of edited images. to Original images linked when using [gallery] instead of edited images.
- Milestone Awaiting Triage deleted
- Resolution fixed deleted
- Status changed from closed to reopened