Image cropping | scaling on thumbnails | featured images

Hi there, first off I really love the theme. Nice work guys!

This Function below is cropping the images inappropriately, cutting the top and the bottom of the images.

add_image_size( ‘sparkling-featured’, 750, 410, true );
add_image_size( ‘tab-small’, 60, 60 , true); // Small Thumbnail

I have been using 3 sizes for featured images,
1- 705 by 960
2- 555 by 555
3- 550 by 550

Please, can you alter the function so that it won’t crop the above image sizes?

Secondly, which plugin would I need to regenerate Thumbnails after the function is altered? there are two, one is “Force Regenerate”, and the second one is “Regenerate Thumbnails”? so that the previously created thumbnails won’t occupy any space and get replaced.

Thanks in advance!

Hi @soshailakash,

I hope you are well today and thank you for your question.

You can achieve this using the attached small plugin that contains the following code.

add_action( 'after_setup_theme', 'custom_sparkling_setup', 99 );

function custom_sparkling_setup() {

	add_image_size( 'sparkling-featured', 1070, 500, true );
  	add_image_size( 'tab-small', 60, 60 , true); // Small Thumbnail

}

Change the image size in the above plugin code to whatever you want to use.

The already used images are not resized automatically to the new sizes, you have to use the following plugin to regenerate the images with new sizes.

Best Regards,
Movin

Hi @Movin

Thanks for taking the time to answer, really appreciate it.

I tried applying different sizes but it doesn’t seem to adopt, The "Force Regenerate isn’t compatible with the version of theme that I’ve been using.

And “Regenerate Thumbnails” doesn’t create the sizes I place in the “Functions File”, neither does it delete the previous sizes.

Anyways, this is what I have placed in the code

add_image_size ( ‘sparkling-featured’, 100, 100, );

And this seems to be working somehow, it’s creating another 100 by 100 image, but thankfully it’s working with the Plugin “Regenerate Thumbnails”

Please restrain me from making any mistakes.

P.S I’ve been searching for a premium version of “Sparkling” but I can’t find it. I was wondering if, Would you be interested in creating a simple but lightning fast theme for me?

P.S I’ve been searching for a premium version of “Sparkling” but I can’t find it. I was wondering if, Would you be interested in creating a simple but lightning fast theme for me?

Currently there isn’t any premium version of Sparkling theme .

If you are not a developer then you can consider hiring a developer to develop it for you. You can hire a developer from any freelance site. Colorlib recommends the developer https://www.upwork.com/freelancers/~011652ffec8865c6d5

Hi @Movin

I suppose You have developed Sparkling, I must tell you, I absolutely love it. It’s flawless.

I’ll get in touch with Vinod, Thanks again, I really appreciate your time and support.

You are most welcome here :slight_smile: