Does MoreGallery support SVG or PDF files as well?

Yes, but you may need to update a few settings in MODX first. This also requires the imagick extension to be available in your PHP configuration.

In the system settings, add svg and pdf to the upload_images system setting, if they're not already listed. Next, in the media source you use with MoreGallery, also add them to the imageExtensions property. That should allow you to upload SVG and PDF files into a gallery.

For the cropping to work with SVG and PDFs, you need the imagick extension for PHP. It is common, but not always available.

To see if imagick is installed, go to Manage > Reports > System Info in the manager and click on phpinfo(). Do a search on the page (ctrl/cmd+f) for imagick. There should be a full block of information including versions and supported formats. If that's missing, then you don't have imagick installed, and you should reach out to your host or server administrator.

For standard image files (png, jpeg, gif), the gd extension is sufficient, which is installed on virtually all servers.

Note that SVGs and PDFs are transformed into PNGs for the manager thumbnail and crops you define. In some cases, especially with optimized SVGs, this may actually make the thumbnails larger in filesize. You can consider building specialized markup for your SVGs for such cases, which applies the scaling to the source image directly.

Still need help? Send us an email Send us an email