Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #452314

    Hi Guys:

    I found a lot of discussions on image size, but not this particular item. I know that WordPress and Enfold create multiple different sized/cropped versions when you upload an image. Here’s the problem: When I go to insert an image using the Advanced Layout Editor and an Image Media Element, not all the sizes created are available in the Attachment Display Settings dropdown. The one in particular I’m looking at has 18 different versions available in the folder on disk, but only 11 of those are available to select in the dropdown. Is there a way to have all the different sizes be available???

    Thanks!

    Scott

    • This topic was modified 9 years, 1 month ago by scotthco.
    #453234

    Hey scotthco!

    How big is the image that your uploading? If for example it’s only 400 x 400 then only the “Thumbnail” and “Medium” sizes will be selectable. If you upload a larger image then you should be able to use the other sizes as well.

    Cheers!
    Elliott

    #453491

    Hi Elliott:

    The full sized image is 1732w x 1155h. I’ve uploaded a couple of screenshots to my site that illustrate what I’m talking about.

    These are the images that were created when original was uploaded and are available on disk.
    Images Available on Disk

    These are the images that are available in the Attachment Display Settings drop down.
    Images in Drop Down

    FYI – The site to which I uploaded the images is NOT the site in question. That site is still on my development machine.

    Thanks!

    #453850

    Hey!

    If you want to add all thumbnails in the drop down list, you can edit functions.php. Look for this code:

    $avia_config['selectableImgSize'] = array(
    	'square' 				=> __('Square','avia_framework'),
    	'featured'  			=> __('Featured Thin','avia_framework'),
    	'featured_large'  		=> __('Featured Large','avia_framework'),
    	'portfolio' 			=> __('Portfolio','avia_framework'),
    	'gallery' 				=> __('Gallery','avia_framework'),
    	'entry_with_sidebar' 	=> __('Entry with Sidebar','avia_framework'),
    	'entry_without_sidebar'	=> __('Entry without Sidebar','avia_framework'),
    	'extra_large' 			=> __('Fullscreen Sections/Sliders','avia_framework'),
    );
    

    Above that, you can find the list of thumbnails available in the theme. You can register the other thumbnails in the $avia_config[‘selectableImgSize’] array.

    Best regards,
    Ismael

    #454899

    Thanks, Ismael! I think I’ll try this.

    Can it be implemented in the child theme so it doesn’t get wiped out when Enfold gets updated, or would that hose things up?

    #455442

    Hi!

    You can add this to the functions.php file:

    add_filter( 'image_size_names_choose', 'avia_add_selectable_images' );
    function avia_add_selectable_images($sizes) {
    	$newsize = array (
    		'masonry' => __('Masonry Thumbnail','avia_framework'),
    		'magazine' => __('Magazine Thumbnail','avia_framework')
    	);
    
    	if(isset($newsize))
    	{
    		$sizes = array_merge($sizes, $newsize);
    	}
    
    	return $sizes;
    }

    Add existing thumbnail sizes.

    Cheers!
    Ismael

    #461645

    Thanks, Ismael!

    Sorry it took me so long to try this out. It did work though, at least for the ones listed in the code you referred to. However there are three sizes actually in the folder that this did not cover: 120×120, 450×300, and 450×450. Any idea how to get those guys in there too?

    Thanks again!

    #462300

    Hi!

    You can find all thumbnail sizes in the functions.php file and the Settings > Media panel.

    $avia_config['imgSize']['widget'] 			 	= array('width'=>36,  'height'=>36);						// small preview pics eg sidebar news
    $avia_config['imgSize']['square'] 		 	    = array('width'=>180, 'height'=>180);		                 // small image for blogs
    $avia_config['imgSize']['featured'] 		 	= array('width'=>1500, 'height'=>430 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['featured_large'] 		= array('width'=>1500, 'height'=>630 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['extra_large'] 		 	= array('width'=>1500, 'height'=>1500 , 'crop' => false);	// images for fullscrren slider
    $avia_config['imgSize']['portfolio'] 		 	= array('width'=>495, 'height'=>400 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['portfolio_small'] 		= array('width'=>260, 'height'=>185 );						// images for portfolio 4 columns
    $avia_config['imgSize']['gallery'] 		 		= array('width'=>845, 'height'=>684 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['magazine'] 		 	= array('width'=>710, 'height'=>375 );						// images for magazines
    $avia_config['imgSize']['masonry'] 		 		= array('width'=>705, 'height'=>705 , 'crop' => false);		// images for fullscreen masonry
    $avia_config['imgSize']['entry_with_sidebar'] 	= array('width'=>845, 'height'=>321);		            	// big images for blog and page entries
    $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize'] = apply_filters('avf_modify_thumb_size', $avia_config['imgSize']);

    You can add the name of the thumbnail in the snippet above. Just follow the pattern.

    Cheers!
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.