WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#8736 closed defect (bug) (invalid)

Gallery shortcode call gets wrong thumbnail sizes

Reported by: alexramirez Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Gallery Keywords:
Focuses: Cc:

Description

In WP 2.7, when using the simple shortcode call ("[gallery]") in the template, the HTML obtained does not include the thumbnail size (files should end with "-150x150.jpg"), but the original size is returned.

In wp-includes/wp_get_attachment_link, the function wp_get_attachment_link has the default size parameter ("thumbnail"), but the $link_text = wp_get_attachment_image() call seems to obtain wrong results.

The $link_text variable does not have any thumbnail size in the images displayed.

Previous versions of WP worked correctly.

A hack such as :
$link_text = str_replace('.jpg" class="attachment-thumbnail"','-150x150.jpg" class="attachment-thumbnail"',$link_text);
gets the correct thumbnails displayed, but is clearly not a solution ;-)

Change History (12)

comment:1 @alexramirez7 years ago

Just a comment on my previous post: I am using the Spanish (2.7-es_ES) version of WP, in case it's related to the localized versions (even whrn it's in the core part, the bug). It was an upgrade, but deleting all previous code files, and uploading the new ones.

comment:2 @Denis-de-Bernardy7 years ago

  • Milestone set to 2.8
  • Version set to 2.7

can't reproduce...

comment:3 @daltonrooney7 years ago

For the record, I am having the reverse problem: no matter what options I use in the gallery shortcode, thumbnails are always returned.

comment:4 @janeforshort6 years ago

  • Milestone changed from 2.8 to Future Release

Punting due to feature freeze. Reconsider with next release.

comment:5 @janeforshort6 years ago

  • Component changed from General to Gallery
  • Owner anonymous deleted

comment:6 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added

comment:7 @Denis-de-Bernardy6 years ago

  • Milestone changed from Future Release to 2.9

comment:8 @azaozz6 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

No patch, no interest.

comment:9 @Denis-de-Bernardy6 years ago

it's actually invalid... with GD around, the correct image is returned.

comment:10 @lloydbudd6 years ago

  • Milestone changed from 2.9 to Unassigned

comment:11 @nacin6 years ago

  • Milestone Unassigned deleted
  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:12 @nacin6 years ago

  • Keywords needs-patch removed
  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.