-
AuthorPosts
-
February 4, 2016 at 5:25 pm #577880
Hi,
How can I stop featured images from cropping? I’d like them to keep their aspect ratio. I’ve looked through some of the posts here and done the following:
I’ve added the Simple Image Sizes and turned off cropping on
featured size
featured_large size
extra_large sizeand then added the CSS
.big-preview {
display: block;
padding: 0;
}.big-preview.single-small .attachment-large.wp-post-image {
width: 100%;
}But this doesn’t stop featured images from being cropped.
Can you help?
Thanks
Phil
February 5, 2016 at 3:15 am #578173Hey philthebass!
Look around line 170 in the /enfold/functions.php file.
$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']);
Try setting the crop to false on all of the images sizes and then regenerate your thumbnails with this plugin, http://wordpress.org/extend/plugins/regenerate-thumbnails/.
Cheers!
ElliottFebruary 17, 2016 at 8:46 pm #584938I’m having the same problem.
You can see it here: http://www.jillgottenstrater.com/create_change/
(login provided privately)I added the following code to my Enfold Child Theme Functions
$avia_config['imgSize']['widget'] = array('width'=>36, 'height'=>36, 'crop' => false); // small preview pics eg sidebar news $avia_config['imgSize']['square'] = array('width'=>180, 'height'=>180, 'crop' => false); // small image for blogs $avia_config['imgSize']['featured'] = array('width'=>1500, 'height'=>430, 'crop' => false); // images for fullsize pages and fullsize slider $avia_config['imgSize']['featured_large'] = array('width'=>1500, 'height'=>630, 'crop' => false ); // 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, 'crop' => false ); // images for portfolio entries (2,3 column) $avia_config['imgSize']['portfolio_small'] = array('width'=>260, 'height'=>185, 'crop' => false ); // images for portfolio 4 columns $avia_config['imgSize']['gallery'] = array('width'=>845, 'height'=>684, 'crop' => false ); // images for portfolio entries (2,3 column) $avia_config['imgSize']['magazine'] = array('width'=>710, 'height'=>375, 'crop' => false ); // 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, 'crop' => false); // big images for blog and page entries $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423, 'crop' => false ); // images for fullsize pages and fullsize slider $avia_config['imgSize'] = apply_filters('avf_modify_thumb_size', $avia_config['imgSize']);
I would like to display the featured image uncropped. Also, its not spanning the column width.
February 17, 2016 at 11:11 pm #585004Hi!
Have you regenerated the thumbnails, and it did not worked?
Cheers!
BasilisFebruary 17, 2016 at 11:21 pm #585008Yes, I regenerated some of them (and cleared the cache). No luck. :(
February 20, 2016 at 6:07 am #586392Hey!
Please install the following plugin then go to the Settings > Media panel. Adjust the thumbnail sizes and turn on/off the cropping parameter. Save then regenerate the thumbnails afterwards. https://wordpress.org/plugins/simple-image-sizes/
Cheers!
IsmaelFebruary 22, 2016 at 1:17 am #586784Almost completely fixed! Its just that the featured images won’t quite line up with the title bar above it. Can you please help?
For instance the frog photo isn’t as wide as the blue bar (“29 ways to love yourself”)
Thanks!
February 24, 2016 at 3:00 pm #588409Hey!
frog image lines up perfectly with blue bar for me. Please clear browser cache and hard refresh a few times. Check on another computer as well. Provide us screenshots of the issue if the issue persists for you.
Regards,
AndyFebruary 24, 2016 at 3:25 pm #588421I’ve tried the cache issue. Here are screenshots from Firefox and Chrome. You can see how the width of the blue bar exceeds the large image.
Thanks,
Liz
February 25, 2016 at 12:13 pm #588977Hi!
that’s weird, cause it looks like this for me:
Please try on another computer as well and let us know about your results.
Best regards,
AndyFebruary 26, 2016 at 6:53 pm #589938Hello! I looked at several other computers (that didn’t have stored caches of the site) and its still off.
Please see screenshot:
February 29, 2016 at 1:17 pm #590698Hi!
as your image is 800x800px by default you could increase it’s width max. until 800px:
.big-preview.single-big { width: 800px; }
You could also use some media queries to adjust this code for different screen sizes. For more infos about that: css-tricks.com/snippets/css/media-queries-for-standard-devices/
Regards,
AndyFebruary 29, 2016 at 5:30 pm #590979Thanks for the info! I ended up adding this:
/* featured image width */
.big-preview img {
width: 830px !important;
}And it worked!
Liz -
AuthorPosts
- The topic ‘Featured Image Cropping’ is closed to new replies.