WordPress.org

Make WordPress Core

#24307 closed defect (bug) (worksforme)

Twenty Thirteen: display issues if gallery images are smaller than 300x300

Reported by: professor99 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Bundled Theme Keywords: close
Focuses: Cc:

Description

WordPress 3.6-beta2-24227

Browser: Only tested on Firefox 20

Gallery excerpts on the home page are magnified.

Also missing captions on both excerpt and gallery page.
This may be addressed by #23584 "closed defect (bug) (fixed)
Twenty Thirteen: Gallery captions are hidden" but I'm not sure if captions were still meant to be hidden or displayed.

On the gallery page the centered images look out of place. Much better to displayed them from the left side as done for 2012.

See attached files for screenshots.

Also attached 2012 gallery screenshot for comparison which is the same on both the excerpt and the gallery page.

Andy Bruin

Attachments (8)

gallery2013excerpt.jpg (85.0 KB) - added by professor99 11 months ago.
Gallery 2013 Excerpt
gallery2013main.jpg (92.1 KB) - added by professor99 11 months ago.
Gallery 2013 Main
gallery2012.jpg (75.4 KB) - added by professor99 11 months ago.
Gallery 2012
24307.patch (1.5 KB) - added by lancewillett 11 months ago.
24307.1.patch (845 bytes) - added by lancewillett 11 months ago.
Alternate idea using a custom image size
24307.2.diff (882 bytes) - added by obenland 11 months ago.
Centers galleries on index pages.
24307.1.1.diff (984 bytes) - added by obenland 11 months ago.
Patch builds on lancewillett's patch, cropping the image and serving only thumbnails on mobile views, where we display galleries in two columns of thumbnail sized images.
style.css.patch (779 bytes) - added by tyshkev 11 months ago.
removing these two rules seems to solve this issue

Download all attachments as: .zip

Change History (22)

professor9911 months ago

Gallery 2013 Excerpt

professor9911 months ago

Gallery 2013 Main

professor9911 months ago

Gallery 2012

comment:1 professor9911 months ago

Forgot to add image details

Zen Size:98px * 98px, Title: test, Caption: zen
ZipIcon Size: 32px * 32px, Title: ico_zip, Caption: howdy

comment:2 kovshenin11 months ago

  • Milestone changed from Awaiting Review to 3.6

Reproduced with trunk. If the gallery images are less than 300x300, the tiled gallery resizing looks really weird.

comment:3 lancewillett11 months ago

  • Summary changed from Twenty Thirteen: Gallery excerpts are magnified and missing captions to Twenty Thirteen: display issues if gallery images are smaller than 300x300

This seems pretty edge case, but we should try to address anyway.

comment:4 lancewillett11 months ago

  • Keywords needs-patch added

I'd also like to relook at how we load all large versions for the gallery images on index. We should try a different technique that only loads the first image in large size, and the rest thumbnail.

lancewillett11 months ago

comment:5 lancewillett11 months ago

Patch is a quick attempt at getting the first image in a gallery, and outputting "large" for only that one image. Not working fully ... but it's the idea.

lancewillett11 months ago

Alternate idea using a custom image size

comment:6 lancewillett11 months ago

  • Priority changed from normal to high

comment:7 obenland11 months ago

I think 24307.patch​ would set a bad precedent.

I do like .1, though we have to be aware that galleries that were created prior to switching to Twenty Thirteen, will fall back to the 'full' image size.

obenland11 months ago

Centers galleries on index pages.

obenland11 months ago

Patch builds on lancewillett's patch, cropping the image and serving only thumbnails on mobile views, where we display galleries in two columns of thumbnail sized images.

comment:8 lancewillett11 months ago

  • Keywords has-patch added; needs-patch removed

Oh, @obenland -- pro tip for the "new Trac" -- if you use .patch it'll look nicer in the diff view. I found it out via Westi. :)

comment:9 lancewillett11 months ago

In 24285:

Twenty Thirteen: ensure galleries are displayed correctly (centered) on both single and indexed views, props obenland. See #24307.

tyshkev11 months ago

removing these two rules seems to solve this issue

comment:10 lancewillett11 months ago

@tyshkev But does it change the layout? The designer's intent was for the first image in the gallery to be 300px by 300 px.

comment:11 lancewillett11 months ago

In 24333:

Twenty Thirteen: create new image size for galleries, at 300 x 300 so that "large" image size doesn't load for a resulting thumbnail on index views. See #24307.

comment:12 lancewillett11 months ago

In 24338:

Twenty Thirteen: revert adding new image size for galleries., Using existing medium size instead, and thumbnail for mobile views. See #24307.

comment:13 lancewillett11 months ago

  • Keywords 2nd-opinion close added; has-patch removed
  • Priority changed from high to normal

Last item to work on before closing this ticket -- how to handle case of images smaller than 300? I can't think of a way with pure CSS. We might just have to live with it.

Opinions?

comment:14 lancewillett11 months ago

  • Keywords 2nd-opinion removed
  • Milestone 3.6 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I've thought about this a bit more, doesn't seem a simple way to avoid using the special styles for images smaller than 300. It'll just be a known issue, which can be avoided by 1) not using small images or 2) using a standard post for the gallery.

Note: See TracTickets for help on using tickets.