Make WordPress Core

Opened 9 years ago

Closed 8 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:


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)

#1 @alexramirez
9 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.

#2 @Denis-de-Bernardy
9 years ago

  • Milestone set to 2.8
  • Version set to 2.7

can't reproduce...

#3 @daltonrooney
9 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.

#4 @janeforshort
9 years ago

  • Milestone changed from 2.8 to Future Release

Punting due to feature freeze. Reconsider with next release.

#5 @janeforshort
9 years ago

  • Component changed from General to Gallery
  • Owner anonymous deleted

#6 @Denis-de-Bernardy
9 years ago

  • Keywords needs-patch added

#7 @Denis-de-Bernardy
9 years ago

  • Milestone changed from Future Release to 2.9

#8 @azaozz
8 years ago

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

No patch, no interest.

#9 @Denis-de-Bernardy
8 years ago

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

#10 @lloydbudd
8 years ago

  • Milestone changed from 2.9 to Unassigned

#11 @nacin
8 years ago

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

#12 @nacin
8 years ago

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