Skip to content
Permalink
Browse files

Use full resolution for full-width featured image. Fixes #129

  • Loading branch information
raamdev committed Aug 11, 2014
1 parent b42ece8 commit 79898a2c420cca487b6ceaa784456e07ed23d98d
Showing with 1 addition and 1 deletion.
  1. +1 −1 inc/template-tags.php
@@ -536,7 +536,7 @@ function independent_publisher_full_width_featured_image() {
if ( independent_publisher_has_full_width_featured_image() ) {
while ( have_posts() ) : the_post();
if ( has_post_thumbnail() ) :
the_post_thumbnail( array( 700, 700 ), array( 'class' => 'full-width-featured-image' ) );
the_post_thumbnail( 'full', array( 'class' => 'full-width-featured-image' ) );
endif;
endwhile; // end of the loop.
}

9 comments on commit 79898a2

@rad96

This comment has been minimized.

Copy link
Contributor

rad96 replied Aug 11, 2014

WHY?!?!?!?!!??! T_T

@raamdev

This comment has been minimized.

Copy link
Owner Author

raamdev replied Aug 11, 2014

WHY?!?!?!?!!??! T_T

Why not? It makes sense that you'd want to use a higher resolution here, since the image takes up the full-width of the page.

@raamdev

This comment has been minimized.

Copy link
Owner Author

raamdev replied Aug 11, 2014

I suppose I could leave it as it was (array( 700, 700 )) and simply provide a means for hooking into that option (using apply_filter() so that a site owner could change it to "full" if they'd prefer that.

@raamdev

This comment has been minimized.

Copy link
Owner Author

raamdev replied Aug 11, 2014

@rad96 I've changed it so that a site owner can override the default of 700px by adding a filter to independent_publisher_full_width_featured_image_size in a Child Theme. If nothing is overridden, the theme simply defaults to 700px. :) See e1fcd1b.

This makes a lot more sense than changing the default size for everyone. Thanks for calling me out!

@manishsuwal

This comment has been minimized.

Copy link
Contributor

manishsuwal replied Aug 12, 2014

I don't know if my query belongs here.

Every time I upload a photo to my website, I resize my photo to 700px width. Does that make it load faster?

What's the best size to upload a photo to my website? Is it 1024px width? or 2048px width? or 700px width because that's the highest default? or width and size really doesn't matter?

@raamdev

This comment has been minimized.

Copy link
Owner Author

raamdev replied Aug 13, 2014

@manishsuwal

Every time I upload a photo to my website, I resize my photo to 700px width. Does that make it load faster?

After the next update goes out, you won't need to do that anymore. See Issue #131 for a fix that was recently committed that fixed this. From now on, when you upload an image (of any size bigger than 700px), WordPress will automatically create a resized version of the image at 700px, and it will use that size for featured images.

If you want to use a higher resolution than 700px for your featured images (which you might want to do if you use featured images as Post Covers, since those images are loaded at the full-width of the browser and you might want a higher resolution), you'll be able to manually specify a different size to use using the code I posted here: #129 (comment)

@manishsuwal

This comment has been minimized.

Copy link
Contributor

manishsuwal replied Aug 13, 2014

@raamdev

This comment has been minimized.

Copy link
Owner Author

raamdev replied Aug 13, 2014

For example, only 3264px wide or 2048px wide. What do
you think is appropriate?

I think whatever size you want to upload is appropriate. I'd probably go with the highest resolution if you're intending for it to also be an online backup method. WordPress will resize the images to various sizes for you automatically, so you don't need to worry about the large size being too big.

@manishsuwal

This comment has been minimized.

Copy link
Contributor

manishsuwal replied Aug 13, 2014

Please sign in to comment.
You can’t perform that action at this time.