Image header resizing with fixed with of 1930

  • Author
    Posts
  • #11977
    Fulco

    Hi Mantra team of cryoutcreations!

    I saw that you mentioned my previous forum post as the reason for a fix of the header sizing issue.
    Thanks for that, espicially because I am a WordPress newbie and not a seasoned website builder. Nevertheless I was somewhat disappointed that you did not answer the forum post because I was really looking and waiting for that. It was not until I updated Mantra to 2.1 yesterday that I saw your changelog/announcement in the backend of WP which directs to your site. As sais, big surprise for me that I, a self considered nono with regard to site building, was mentioned.

    Anyway, to show my nono-ness I stil don’t get it all.
    The change you incorporated in 2.1 of Mantra is that you provide a checkbox to maintain the aspect ration of a header image.
    That in itself is fine of course but my pictures of 4752*3168px still don’t show properly when I put up a height of e.g. 900. With a retained aspect ratio of 1,5 (4:3) this would result in a width of 1350px, but the header width remains 1930px.
    Thus: The pic will not show properly right? Or am I doing something completely wrong here.
    Should I resize pic’s before uploading? Adapting pic’s after uploading results (at least in my case) of not having the Original sized pic anymore and i discovered that it uses more serverspace.
    But it is not handy to do it either way.

    If you make a page and put a pic in the article, WP will provide you with a neat way to resize of 60 – 90% of Original.
    But not with the header.

    Also pic’s that are set as featured images to a category, will show up on the category page, as long as you either upload them in the correct dimensions or resize within the media section with the above mentioned drawback, and provided that the image size is larger than the set header dimensions right?

    I will give you a further example of how an Original 4752*3168px picture displays with a header setting of 1287wide. Please look here: http://www.fulco.eu/page-het-gezin/alle-berichten/

    And the same image resized to 1287x1930px look like this:http://www.fulco.eu/page-het-gezin/
    The resizing was done before upload.
    On the same page, within the article you so the Original pic of 4752*3168px but automatically resized.

    I also want to show you what happens when a header heigth of 600 or 900 would do, but that is only possible when you first have viewed these examples, since header heigth settings are global within mantra.

    So please do get back to me, even if it is with a message that you can’t help me.

    Regards, and keep up the good work,

    Fulco

    P.S. considering a change to Parabola. Would this solve my problem?

    #11995
    Zed
    Cryout Creations mastermind

    Hi.

    I would have replied to your previous forum topic, I just didn’t get around to it.

    The checkbox you mention does a totally different thing than the issue you reported. It’s meant for the mobile/responsiveness view of the site, it has nothing to do with featured images used as header images.

    The fix we included in Mantra 2.1 / Parabola 1.0.1 makes the theme use the image with the exact size as the header to display there. This works when the uploaded image is bigger or at least exactly the size of the header (as configured).

    The trick is that WordPress generates cropped images on upload, and it generates them on the sizes configured at that exact moment. If in the meantime you changed your header size, the images are no longer valid and it reverts to using the full size version.

    I tested this behaviour (after implementing the fix) and as you can see in the image below, the 1920×1080 image (which is also displayed in the post, but also set as a featured image) is cropped and resized to fit in the header at the correct size (as configured in the settings).

    If you still encounter issues getting the wrong image size after the updates, try to delete that image from the library and re-upload it (to force WordPress to re-create the smaller versions).


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #12027
    Fulco

    Hi Zed,

    Thanx for your reply. This clarifies a lot to me. As I wrote somewhere in my previous posts, I already discovered that WP generates cropped images automatically (in an FTP client you can see that). I also figured out (after that post) that it crops to the dimensions that are set in Mantra at that time for any image uploaded after the header dimensions settings become effective.
    So I can follow your story on this.
    However, for a non seasoned websuite owner, and as shown by your header image, automatic cropping does not always provide a nice view. Your header image is only a part of the big image. When the header height and width are not in the same proportions as the original image, you will end up with a part that you might not like.
    Unless there is a possibility to enter height and width for the chosen header image and an option to maintain aspect ratio of the original image, which is already uploaded to the media section, there will be no other option than to upload only images cropped to the correct size.
    Another option would be to crop outside of WP, upload through an ftp client and select a picture by using the right url (which is somewhere in your mediasection of WP or whatever location on your server you might choose).
    This last method is in my opionion not a valid option since WP advocates that it is a platform for users without knowledge.
    In order to make things really user friendly, it would be neat to have the possibility to have the option in the header settings to enter height and width of the header image, an aspect ratio select/check box for cropping purpose, after which the selected header image is cropped.
    This way images can be displayed as original, in whole, resized in a user friendly way.
    All this of course besides the possibilities already at hand, and as shown by your image.

    Again, thanx a lot for the nice Mantra theme and keep up the good work.

    Regards,

    Fulco

    #12717
    Zed
    Cryout Creations mastermind

    Image crops are created by WordPress, not by the theme. The theme can only request particular sizes, not crop viewpoints.
    So this functionality needs to be added by WordPress.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Image header resizing with fixed with of 1930’ is closed to new replies.