Tagged: Resize thumbnails
- December 16, 2016 at 5:50 pm #1282289
I have regenerated all my images to new thumbnail sizes, but I can’t find a way to change the default sizes in Spacious Pro. I would like to change the medium size in SP from 270 x270 to 400 x 300.
I’m sure there is a simple function to do this but I can’t find it in previous posts in this forum.
Can you help?December 17, 2016 at 2:47 am #1282345
For this, you can create a child theme for your site and the crop the image via this function:
add_image_size('spacious-medium-child', 400, 300, true);in the ‘functions.php’ file of the child theme. Now after that, you need to find the registered size in parent theme and duplicate those files in the child theme, ie, the size to be found is
featured-blog-medium, which need to be replaced with
spacious-medium-child. Hope you have got the idea. Thanks.December 17, 2016 at 12:46 pm #1282377
THanks Bishal, but I can’t seem to get it to work. This is the code I used.
add_image_size('spacious-medium-child', 400, 300, true ); // Cropping the images to different sizes to be used in the theme add_image_size( 'featured-blog-large', 750, 350, true ); add_image_size( 'spacious-medium-child', 400, 300, true ); add_image_size( 'featured', 642, 300, true ); add_image_size( 'featured-blog-medium-small', 230, 230, true );
I’m not sure what I have done wrong.December 18, 2016 at 12:42 am #1282433
You need to add that provided code in the ‘functions.php’ file of the child theme. After that, you can search for the files displaying the
featured-blog-mediumto change to
spacious-medium-child. For eg: in the file ‘content-blog-image-medium.php’ via your child theme. Also, using the ‘Regenerate Thumbnails’ plugin is required to regenerate all of your images after this new size has been registered. Thanks.December 18, 2016 at 10:19 am #1282450
Ok, got it. Thanks.December 18, 2016 at 1:09 pm #1282462
If there are any further query regarding to our theme, then, please feel free to post them. Thanks.
You must be logged in to reply to this topic.