Trouble Setting Size of Featured Post Thumbnail Images in Sparkling Child Theme

I can’t set the size of my featured images on posts page. (Note: my featured images come from external URLs, not my media library). In the parent Sparkling theme functions.php file 3 image sizes are defined:

	  add_image_size( 'sparkling-featured', 750, 410, true );
	  add_image_size( 'sparkling-featured-fullwidth', 1140, 624, true );
	  add_image_size( 'tab-small', 60, 60 , true ); // Small Thumbnail

And, in the parent content.php file, the code suggests post thumbnails use either the ‘sparkling-featured’ or ‘sparkling-featured-fullwidth’ sizes:

           <div class="blog-item-wrap">
			<a>" title="&lt;?php the_title_attribute(); ?&gt;" &gt;
			&lt;?php
			if ( is_page_template( 'page-fullwidth.php' ) ) {
				the_post_thumbnail( 'sparkling-featured-fullwidth', array(
					'class' =&gt; 'single-featured',
				) );
			} else {                    the_post_thumbnail( 'sparkling-featured', array(
				'class' =&gt; 'single-featured',
			) );

This being the case, I tried to set all featured image thumbnails to 50 x 50 pixels, by creating a child functions.php file, containing the following code:

           &lt;?php
           add_theme_support('post-thumbnails');
           add_action( 'after_setup_theme', 'custom_sparkling_setup', 99 );
           function custom_sparkling_setup() {
               add_image_size( 'sparkling-featured', 50, 50, true );
               add_image_size( 'sparkling-featured-fullwidth', 50, 50, true );
               add_image_size( 'tab-small', 50, 50 , true); // Small Thumbnail
           }
           ?&gt;

However, the above code is not setting the image size. The images display in random sizes. Can someone please suggest a solution? Thanks very much.

Hi @dimery2006,

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

I am not sure what you meant by “featured images come from external URLs, not my media library” so could you please describe it a bit more in detail and share me the page URL from your site where it is displaying so that i can help you to change its size?

Best Regards,
Movin

Dear Movin -

Thank you for responding so quickly. What I mean is that, instead of uploading the actual image files to my site (where they would be stored locally), I’m instead referencing the URL addresses to the images. The images are stored elsewhere on the internet. Right now, I’m just learning WordPress, so I’ve added some “dummy” images to my site (using URLs) to see how they would display, but the images are showing up in different sizes (I want them all the same size). Please see my site here —> http://intechio.com/

I’m also going to attempt to attach a screenshot of how I added them as URLs.

Thank you.

As the images are displaying from different sites on your site like http://www.treenames.net/ti/sequoiadendron/Sentinel_Tree_Giant_Redwood_Sequoiadendron_giganteum578.jpg so you don’t have control to resize them and only those sites can resize them.

Thanks, Movin -
Disappointing that I can’t set the display size of the images I link to with URLS. The reason I want to use URLs, instead of directly uploading images, is that I plan to (potentially) upload several images per day. Eventually, I assume I’ll exceed my site’s storage limitation (though my hostgator hosting account is advertised with unlimited storage, which I feel is too good to be true).

Sorry we couldn’t help in this matter but You are always welcome here :slight_smile: