0

I have an issue with Magento 2.3.0 not resizing images from view.xml file in custom theme.

My view.xml:

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_Catalog">
            <image id="cycle_images_new_products_widget" type="small_image">
                <width>600</width>
                <height>600</height>
                <frame>0</frame>
            </image>
        </images>
    </media>
</view>

When i run bin/magento catalog:images:resize it seems to work reporting no errors but the images from the above view.xml file are not generated. No images are 600x600px. Also in the frontend I am getting a 403 forbidden error when I try to access the image url direct. http://www.andrewkurtisdirect.local/pub/media/catalog/product/cache/0ee050c3ffc3555709b9bb6062f4d7e9/a/k/ak_sunset_rocks1.jpg

The folder 0ee050c3ffc3555709b9bb6062f4d7e9 does not exist in my pub/media/catalog/product/cache folder.

Does anyone know why this xml file is not being read when resizing images?

Many thanks in advance.

EDIT

I have just added <constrain>true</constrain> above the <width> element. This produces a This element is not expected error in the frontend, so the view.xml is being read.

  • have you tried running static-content:deploy? – magefms Jan 28 at 3:18
  • Yes no joy, also running in developer mode. – Garry Jan 28 at 19:03
  • This is not an ideal solution but I moved the view.xml above into my widget module view.xml file and the images were created in the folder above. Not a solution but a workaround for now. – Garry Feb 10 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.