• Resolved avangessel

    (@avangessel)


    Featured images for posts and pages are cropping off the sides of images. I would like it to re-size to show the whole width.

    When I made a page yesterday it was doing this, and I may have changed something to change this behavior, but I cannot figure out how to fix it.

    I have tried “Settings” > “Media” > “Crop thumbnail to exact dimensions” both checked and unchecked. And regenerating thumbnails, but the images are always cropped to fit the size.

    Love this theme! You do wonderful work, keep it up!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hey there! Thanks!

    In functions.php on line 54 you will see:

    add_image_size( 'thumb-large', 720, 340, true );

    Depending on how you want the thumbnail to be handled, you can for example do:

    add_image_size( 'thumb-large', 720, 9999 );

    This will always crop the image to 720px width, but any height depending on what image you upload. So it will show the whole image.

    Thread Starter avangessel

    (@avangessel)

    That worked! Thanks!

    Along those same lines, is there a way I could always re-size the images so the largest dimension is is one scaled to the thumbnail size.

    Ex. a 1440*340 image is scaled to 720*170 and a 800*640 image is scaled to 400*320?

    If there’s not a straightforward way to do this then I can deal with using the picture width, I haven’t dealt with php hardly at all before.

    Thanks!

    You can do a so-called soft-crop, by setting:

    add_image_size( 'thumb-large', 720, 340 );

    Without the “true” value.

    That will result in a “soft proportional crop” to max 720px width, max 340px height. I think that may be what you are asking for, or close to it!

    Thread Starter avangessel

    (@avangessel)

    That is exactly what I wanted! I suppose I should have looked up the add_image_size() function, but thanks for the quick responses!

    so if i want my image 610px by 310px as default i do as you said?

    If you want it to crop to exactly those dimensions, then you’d do:

    add_image_size( 'thumb-large', 610, 310, true );

    However, since the content area is 720px wide by default, this would mean you’d need to set “Website Max-width” so that the content area is 610px. 720px – 610px = 110px.

    2 sidebars = 1380px – 110px = 1270px
    1 sidebar = 1120px – 110px = 1010px

    alexandra so whenever we are to add image to post the image should be 720px by any height right? as par the theme defualt, or will can use any size px but 720px if is a featured image or in slider?

    Hello Alexander Agnarson,
    I like your hueman theme so much. But I am new in WordPress. I want to make a movie download site. For this I Want to know something about the theme. please help me.
    1. I want to change the featured Image Width-150px and Height-225px.
    2. How to ad a slideshow in header?
    3. Sidebar Item style not preferable. I want to make 2 columns Category. How to do?
    4. want to change Post text color black. But I can’t.
    5. In a post I want to make 3 column which have 2 pictures two sides and a table in middle side.
    6. Need to change sidebar width. Primary about 200px and secondary 150px.

    I still can’t fix featured image problem about cropping. I want my image to be 100% width in 720px space (if I have picture 796px – dimension from previous theme) and 100% height, no matter what the height will be. Now all my featured imaged are cropped from centre. I tried all above.

    My page: http://kk-adecco-mb.si/

    Same is with thumbnail photos. In the 3rd page you can see thumbnails from featured images form previous theme that are not cropped.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You can start up your own threads here: http://wordpress.org/support/theme/hueman#postform

    Hello,

    I tried to change the size of the featured imagine size in the Theme Functions (function.php) and I got this

    Parse error: syntax error, unexpected ‘)’ in /home/content/p3nexnas03/33/2195733/html/wp-content/themes/hueman/functions.php on line 81

    What can I do? please some help!!

    This is the code I got
    // Thumbnail sizes
    add_image_size( ‘thumb-small’, 160, 160, true );
    add_image_size( ‘thumb-medium’, 520, 245, true );
    add_image_size( ‘thumb-large’, 720, 340, true );

    How can i avoid cropping images

    If you guys are facing problem editing the backend code to avoid cropping of images, you can scale down you featured images to “520 X 245”. It does not appear cropped and looks good as well (See seoraja.com)

    Hi Alexander, hi guys,
    I’m facing a matter with thumbs too.
    Since i’ve used Hueman all my new thumbs (on homepage- both sidebars and content – , category page and search results page) are cropped and too little.

    Here you can see an example:

    http://80s.it/?s=paperino

    I tryed modifing the functions.php file as above but it doesn’t work.

    Consider that I added those lines

    .post-meta {
    display: table;
    margin-bottom: -4px;
    }

    .post-thumbnail {
    width: 30%;
    float: left;
    margin-right: 20px;
    }

    to my style.css to change the disposition of the news in the content area (a solution found in this forum, then) of the homepage.

    Hope you can help me,
    thank you,
    Daniele

    Solved modifying function.php πŸ˜€

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Featured Images being cropped’ is closed to new replies.