Delivering the best experience in your blog requires a lot of things. We've covered most of them in our
. However, sometimes you need to tweak the default settings to suit your requirements.By default, blog templates automatically resize images to 1000. We do that to improve the loading speed since users usually upload larger (heavier) images. This value is selected as a default based on our previous experiences.
However, in case that doesn't work for you, you can easily resize the featured images on the posts list.
To resize features images on blog posts:
1. Create the following file in your Magento 2:
app/design/frontend/ThemeVendor/theme_name/Magefan_Blog/layout/blog_post_list.xml
2. Add the following code to it:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="blog.posts.list">
<action method="setBackgroundImageWidth">
<argument name="template" xsi:type="string">500</argument>
</action>
</referenceBlock>
</body>
</page>
The value you see here is 500. But you can change to whatever value works for you. Save the file and flush Magento cache. Try different values till you find the one that works best for you.
If you want to change anything else in your blog, check out the Development section in the blog user guide.