Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement WPThumb for dynamic Post Thumbnails #40

Open
BoweFrankema opened this issue Jul 31, 2012 · 0 comments
Open

Implement WPThumb for dynamic Post Thumbnails #40

BoweFrankema opened this issue Jul 31, 2012 · 0 comments

Comments

@BoweFrankema
Copy link
Contributor

WPThumb allows us stop generating several post thumbnail sizes in our themes. We simply set add one image-size and then serve the proper image sizes directly in our custom templates or and template parts.

Since it integrates with the native post_thumbnail function nothing will change besides that we'll be passing an array that gives the exact sizes needed:

<?php the_post_thumbnail( array( 'width' => 500, 'height' => 500, 'crop' => true ) ) ?>

Because we're dealing with responsive designs we could allow the user to modify the width through either the options panel or the ini files.

 <?php the_post_thumbnail( $post-thumbnail-option-size ) ?>

[infinity-thumbnail.width]
type = "css/length-px"
title = "Width"
description = "Select the width of the default post thumbnail"
min = 400
max = 1250
step = 1
    default_value = 670

Another big advantage is the flexibility when it comes to creating slider and grid images (like on the homepage of http://infinitythemes.net).

Not to mention that Featured images resize properly across different Infinity Themes with bloating the database.

More info about WPThumb:
https://github.com/humanmade/WPThumb
http://hmn.md/introducing-wp-thumb/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant