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
Copy link
Contributor

@rad96 rad96 commented on 79898a2 Aug 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@raamdev
Copy link
Owner Author

@raamdev raamdev commented on 79898a2 Aug 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner Author

@raamdev raamdev commented on 79898a2 Aug 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner Author

@raamdev raamdev commented on 79898a2 Aug 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link
Contributor

@manishsuwal manishsuwal commented on 79898a2 Aug 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner Author

@raamdev raamdev commented on 79898a2 Aug 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link
Contributor

@manishsuwal manishsuwal commented on 79898a2 Aug 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raamdev
Copy link
Owner Author

@raamdev raamdev commented on 79898a2 Aug 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

@manishsuwal manishsuwal commented on 79898a2 Aug 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.