Image ratio in Jnews-Module 5
Post count: 61nbitsosNovember 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: 2684Post count: 61nbitsosNovember 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: 10705AdekNovember 15, 2017 at 2:00 am #25446
In this case, please find out this file
/jnews/class/Image/Image.phpthen find function
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 youPost count: 61nbitsosNovember 15, 2017 at 7:18 am #25460Post count: 2684RaiNovember 16, 2017 at 12:48 am #25473
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 youPost count: 10705AdekNovember 16, 2017 at 1:04 am #25477
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 youPost count: 61nbitsosNovember 16, 2017 at 7:52 am #25495Post count: 10705AdekNovember 17, 2017 at 1:39 am #25517
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.
You must be logged in to reply to this topic.