Close

Account

Documentation

Forum

Menu

Image ratio in Jnews-Module 5

  • Post count: 55
    nbitsos
    November 13, 2017 at 12:35 pm #25389

    I have Module 5 on home page. The images per post that are displayed on the left are not cropped very well. Is there an option to adjust the crop ration or image size when displayed there?

    thank you.

    Post count: 1921
    Rai
    November 14, 2017 at 1:32 am #25414

    Hi @nbitsos,

    The image ration for that module 5 is 0.715. It would require small tweak to change image size for certain module. May I know what image size you prefer for that module?

    Thank you

    Post count: 55
    nbitsos
    November 14, 2017 at 6:49 am #25426

    Hi,thank you. Can you inform me how can I edit these settings and what files?I want to make some tests on the dimensions for better sizing.

    Post count: 6364
    Adek
    November 15, 2017 at 2:00 am #25446

    Hi nbitsos,

    In this case, please find out this file /jnews/class/Image/Image.php then find function setup_image_size and add_image_size. You may edit those function as your own need. Also, we will recommend you to use JNews Child Theme so the changes that you made won’t lost when theme update. After you have done with the changes, you may need to regenerate all of your images. You can use Regenerate Thumbnails plugin.

    Let us know if you have further question.

    Thank you

    Post count: 55
    nbitsos
    November 15, 2017 at 7:18 am #25460
    This reply has been marked as private.
    Post count: 1921
    Rai
    November 16, 2017 at 12:48 am #25473

    Hi @nbitsos,

    If you change the image size you need to regenerate your images. To do that make sure plugin “Regenerate Thumbnails” is installed & activated. Navigate to “Tools > Regen. Thumbnails” and click the “Regenerate All Thumbnails”.

    We already provide child theme starter in the theme package. Please read here for detail about child theme: https://codex.wordpress.org/Child_Themes

    Thank you

    Post count: 6364
    Adek
    November 16, 2017 at 1:04 am #25477

    Hi nbitsos,

    Please try to change the function as I mention on above. Also, you may need to visit this article https://developer.wordpress.org/reference/functions/add_image_size/ for further reading. The image ratio for that module 5 is 0.715 (see line 101 '350x250'). After you have done with the changes, please try to regenerate all of your images or only certain featured image for testing.

    Thank you

    Post count: 55
    nbitsos
    November 16, 2017 at 7:52 am #25495
    This reply has been marked as private.
    Post count: 6364
    Adek
    November 17, 2017 at 1:39 am #25517

    Hi nbitsos,

    Please make sure if you already regenerate all of your images using Regenerate Thumbnail plugin after making the changes on this file /jnews/class/Image/Image.php. For Featured Image From URL, it won’t affect since it’s external resource. You need to upload to your server to make it works.

    Thank you

You must be logged in to reply to this topic.