Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25758 closed enhancement (fixed)

Twenty Fourteen: Add full-width featured image size

Reported by: iamtakashi's profile iamtakashi Owned by: lancewillett's profile lancewillett
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Since #25031 and changeset:25624 the content sidebar is optional and users can have cleaner full-with layout when the content sidebar is not active, and this is the default layout.

However the maximum width of the featured image is currently 672px and the layout option is a kind of a half baked layout feature at the moment.

Before and after comparison.

There is no set proportional ratio like the default thumbnail so users can upload more slim, panorama like image if they want to.

In my opinion, this makes sense especially with the slider design and it's what the design needs. I believe users would find this useful, especially photo centric magazine sites, but we're not forcing users to have such a large image with this, it's optional and they can still upload smaller images if they want to.

Related: #25031

Attachments (2)

25758.diff (1.5 KB) - added by iamtakashi 11 years ago.
25758.2.diff (1.6 KB) - added by iamtakashi 11 years ago.

Download all attachments as: .zip

Change History (11)

@iamtakashi
11 years ago

#1 @iamtakashi
11 years ago

  • Keywords has-patch added

#2 follow-up: @lancewillett
11 years ago

  • Keywords dev-feedback added
  • Milestone changed from Awaiting Review to 3.8

I thought we'd decided to use the smaller image because of performance (especially on mobile). Does your patch take into account cases like small screens where you don't need to load the 1038 pixel-wide image?

Let's discuss more in office hours, I also know @obenland was very against adding a bigger image size, so I'll want his opinion also.

#3 follow-up: @lancewillett
11 years ago

Noting that in r25979 we added the bigger size anyway. :) So let's re-look at this soon, in the context of:

  1. Performance: we shouldn't load huge images unless they can be displayed at that size
  2. Design: is the wider image essential to the design? (Takashi argues "yes" in this ticket)

#4 in reply to: ↑ 2 @iamtakashi
11 years ago

Replying to lancewillett:

I thought we'd decided to use the smaller image because of performance (especially on mobile).

Just to note that we didn't decided to not to add but we planed to revisit this later.

#5 in reply to: ↑ 3 @iamtakashi
11 years ago

Replying to lancewillett:

Noting that in r25979 we added the bigger size anyway. :) So let's re-look at this soon, in the context of:

  1. Performance: we shouldn't load huge images unless they can be displayed at that size

The current trend of having large images on websites and the growing mobile usage are against each other for sure. We need an elegant way to handle responsive image loading. But what I'm not sure is whether a theme should handle responsive image loading or leave it to plugins or even the core. What's your opinion on this?

  1. Design: is the wider image essential to the design? (Takashi argues "yes" in this ticket)

Yes, it is absolutely essential for the full-width layout in my opinion. It just looks bad and because of the feeling of "missing", it could look like a bug in a way. If the theme doesn't let users upload full-width featured images, it's better to remove the full-width layout option.

#6 @lancewillett
11 years ago

  • Keywords dev-feedback removed

@iamtakashi Can you refresh this patch please?

@iamtakashi
11 years ago

#7 follow-up: @iamtakashi
11 years ago

Attached a refreshed patch.

wp_is_mobile() certainly helps to not to send the full-width thumbnail to mobile devices but since it also returns true for iPad which is wider than the width of the regular post thumbnail, it ends up like this: https://cloudup.com/cJhJD8LDg6C

I think using wp_is_mobile() is outweigh that iPad users won't see the full-width thumbnail until the core has better dynamic image loading, but what do you guys think? Is there any better approach that makes sense to have in a theme?

#8 in reply to: ↑ 7 @lancewillett
11 years ago

Replying to iamtakashi:

I think using wp_is_mobile() is outweigh that iPad users won't see the full-width thumbnail until the core has better dynamic image loading

I agree, for now. It'd be nice if core had more granular methods, like is_tablet().

Is there any better approach that makes sense to have in a theme?

Good question; let's explore other ways.

One possibility is a lightweight JS file that handles loading the correct image size based on viewport width. It would run once for each page load and update the featured images in the page.

#9 @lancewillett
11 years ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In 26026:

Twenty Fourteen: add full-width featured images for layouts without a content sidebar, but use wp_is_mobile() to load smaller-sized images for mobile. Props iamtakashi, fixes #25758.

Note: See TracTickets for help on using tickets.