Configuration
Theconfig/shopper/media.php file allows you to customize how media files are handled. Below are the available configuration options:
Storage Disk
Specifies the storage disk used to save media files. By default, Shopper uses thepublic disk, but you can change
it to use services like S3, Cloudinary, or other storage systems. Since the file system is based on the Spatie Laravel Media Library,
you also need to define the name of the collection of images and thumbnails for your Models.
Accepts Mime Types
Lists the MIME types allowed for media files. This ensures that only specified file formats can be uploaded. For your need you can add more types.Media Filesize
Sets the maximum allowed file size for media uploads (in kilobytes). This helps control file sizes to avoid performance issues.Image Conversions
Configures image conversions to generate resized or optimized versions of uploaded images. For example, you can create thumbnails or mobile-friendly images.Image Conversions
Shopper registers image conversions from theconfig/shopper/media.php conversions array. By default, two conversions are available: large (800x800) and medium (500x500). All conversions use Fit::Fill and preserve the original image format.
To add custom conversions, add entries to the conversions config:
Retrieving Images
To get the thumbnail URL for a product, brand, or collection:Advanced Customization
If you need further customization, configure a custom disk inconfig/filesystems.php and update the disk_name in config/shopper/media.php. See the Laravel Filesystem documentation for details.