Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm new to wordpress and so far with a limited knowledge of PHP, I was able to build up a theme from scratch. I removed the compression for my homepage images for a better quality of pics. Now, the thumbnails of very small sizes on either side of the trending pane are a little too heavy and I'd like to compress them alone.

This is how my homepage looks: (All the images are not compressed by default)

Home Page_Geekswipe

I need to compress A and C only. I'm not sure how to do it. Is there a way to compress thumbnails based on the size it is displayed?

share|improve this question
1  
Are these different image sizes registered with add_image_size or the same image sizes just downscaled with CSS? –  kraftner Apr 4 at 8:57
    
What do you mean when you say "compression"? size reduction? something else? –  Mark Kaplun Apr 4 at 9:10
    
Take a look at Image quality based on image size. –  ialocin Apr 4 at 9:54
    
@kraftner, yes it is! –  Karthikeyan KC Apr 4 at 21:04
    
@MarkKaplun Size reduction :) –  Karthikeyan KC Apr 4 at 21:04

1 Answer 1

You can actually set and use custom thumbnails using this code in your functions.php, modified appropriately of course.

add_image_size( 'a', 80, 80, true ); // Hard Crop
add_image_size( 'b', 120, 120 ); // Soft Crop
add_image_size( 'c', 590, 9999 ); // Unlimited Height Mode

Details: Post Thumbnails on the Codex

Also a good resource: WPBeginner

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.