I would like to resize image in my wordpress template using url parameter. Best example for this would be WordPress’s very own twenty Twelve theme.
Following is link to image with width parameter in the end. If you change width to 50 it’ll return image with 50px width.
https://twentytwelvedemo.files.wordpress.com/2012/03/wheat-field.jpg?w=500
I’m confused if its server setting or we can do it using php.
Thanks.
WordPress(.org) doesn’t have anything like this built into the core. A lot of theme developers use Timthumb to achieve that. The example you’ve linked to is on a wordpress.com server so there will be something custom going on for that functionality.
You could also look at the WordPress functions add_image_size & the_post_thumbnail.