I am displaying a custom gallery in a custom module and I have to resize my images. I need to know how I can use view.xml in my custom module. If you have a relevant answer then please let me know.

1 Answer 1


You create the custom module and call the your theme etc/view.xml. i think may be help you

<?xml version="1.0"?>
    <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
        <images module="VendorName_ModuleName">
            <image id="custom_image" type="custom_image">

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.