MagestyApps / module-web-images

Magento 2 module for uploading images in optimised formats (SVG, WebP, etc.)
https://www.magestyapps.com
93 stars 16 forks source link

Existing SVG/WEBP images do not sync with commands #21

Closed addMitt closed 5 months ago

addMitt commented 9 months ago

I already had a folder with a lot of .svg's in it, and the following commands did not pull them in to the media gallery, like they did for the default file types:

bin/magento media-content:sync
bin/magento media-gallery:sync

I was able to fix this by adding the following to the di.xml in MagestyApps/WebImages/etc/di.xml

    <type name="Magento\MediaGallerySynchronization\Model\FetchMediaStorageFileBatches">
        <arguments>
            <argument name="fileExtensions" xsi:type="array">
                <item name="svg" xsi:type="string">svg</item>
                <item name="webp" xsi:type="string">webp</item>
            </argument>
        </arguments>
    </type>
MagestyApps commented 5 months ago

@addMitt thanks for tracking and fixing the issue. We've included your fix in version 1.1.8.