Media Settings
Media Settings
Overview
Media Settings allow you to configure how uploaded files are processed by the system. You can control image optimization, WebP generation, thumbnail creation, and upload size limits. These settings apply to all new file uploads and help ensure optimal website performance while maintaining image quality. Proper configuration of media settings can significantly reduce page load times and improve user experience.
Accessing Media Settings
Navigation Path: Dashboard > Media > Media Library > Settings
Alternative Path: Dashboard > Media > Media Settings
Required Permission: media.settings
Direct URL: /admin/media/settings
Key Features
- Image Optimization: Automatic compression to reduce file sizes
- Quality Control: Adjust compression quality for optimal balance
- Dimension Limits: Set maximum width and height for images
- WebP Generation: Create modern WebP versions automatically
- Thumbnail Creation: Generate smaller versions for faster loading
- Upload Limits: Control maximum file size for uploads
- Processing Options: Configure default processing behavior
Main Interface
Settings Organization
The settings page is organized into four main sections:
- Image Optimization: Compression and resizing settings
- WebP Generation: Modern image format settings
- Thumbnail Generation: Thumbnail size and quality settings
- Upload Limits: Maximum file size restrictions
Each section includes:
- Informational banner explaining the purpose
- Individual setting fields with descriptions
- Visual indicators for recommended values
- Save button to apply changes
Information Banners
Each section includes a colored information banner:
- Blue Banner (Image Optimization): Explains quality guidelines
- Green Banner (WebP Generation): Describes WebP benefits
- Purple Banner (Thumbnail Generation): Explains thumbnail usage
- Amber Banner (Upload Limits): Shows file size conversion
Settings and Options
Image Optimization Section
Auto-Optimize Images
- Type: Toggle (Boolean)
- Default: Enabled
- Description: Automatically compress and optimize images during upload
- Effect: Reduces file size while maintaining visual quality
- Recommendation: Keep enabled for all sites
When Enabled:
- Images are automatically compressed
- File sizes are reduced by 30-70%
- Quality is preserved based on quality setting
- Processing happens during upload
When Disabled:
- Images are uploaded as-is
- No compression applied
- Larger file sizes
- Faster upload processing
Image Quality
- Type: Number (1-100)
- Default: 85
- Description: Compression quality level for optimized images
- Range: 1 (lowest quality, smallest size) to 100 (highest quality, largest size)
- Recommendation: 85-90 for most use cases
Quality Guidelines:
| Quality Range | Use Case | File Size | Visual Quality |
|---|---|---|---|
| 90-100 | Professional photography, hero images | Large | Excellent |
| 85-90 | General website images, blog photos | Medium | Very Good |
| 70-84 | Thumbnails, background images | Small | Good |
| 50-69 | Low-priority images | Very Small | Acceptable |
| Below 50 | Not recommended | Tiny | Poor |
Recommended Settings:
- General Use: 85 (best balance)
- High Quality: 90 (professional sites)
- Performance Focus: 75 (faster loading)
Maximum Width
- Type: Number (pixels)
- Default: 1920
- Description: Maximum width for uploaded images
- Effect: Images wider than this are automatically resized
- Recommendation: 1920 for full HD displays
Common Values:
- 1920px: Full HD displays (recommended)
- 2560px: 2K displays
- 3840px: 4K displays
- 1200px: Standard content width
Considerations:
- Larger values = larger file sizes
- Most displays are 1920px or less
- Retina displays benefit from 2x dimensions
- Balance quality with performance
Maximum Height
- Type: Number (pixels)
- Default: 1080
- Description: Maximum height for uploaded images
- Effect: Images taller than this are automatically resized
- Recommendation: 1080 for full HD displays
Common Values:
- 1080px: Full HD displays (recommended)
- 1440px: 2K displays
- 2160px: 4K displays
- 800px: Standard content height
Note: Images are resized proportionally, maintaining aspect ratio.
WebP Generation Section
Generate WebP Versions
- Type: Toggle (Boolean)
- Default: Enabled
- Description: Automatically create WebP versions of uploaded images
- Effect: Creates additional WebP files alongside originals
- Recommendation: Keep enabled for better performance
Benefits of WebP:
- 25-35% smaller file sizes than JPEG
- Better compression than PNG
- Supports transparency like PNG
- Supported by all modern browsers
- Automatic fallback to original format
When Enabled:
- WebP versions created automatically
- Original files are preserved
- Browsers use WebP when supported
- Fallback to original for older browsers
When Disabled:
- Only original format is available
- Larger file sizes
- No modern format benefits
- Simpler file structure
WebP Quality
- Type: Number (1-100)
- Default: 85
- Description: Compression quality for WebP versions
- Range: 1 (lowest quality) to 100 (highest quality)
- Recommendation: 85 (same as image quality)
Quality Guidelines:
- Use same value as Image Quality for consistency
- WebP achieves better compression at same quality
- 85 provides excellent quality with great compression
- Can use slightly lower value (80) for even smaller files
Thumbnail Generation Section
Generate Thumbnails
- Type: Toggle (Boolean)
- Default: Enabled
- Description: Automatically create thumbnail versions of images
- Effect: Creates smaller preview versions
- Recommendation: Keep enabled for galleries and lists
Benefits of Thumbnails:
- Much faster loading in galleries
- Reduced bandwidth usage
- Better user experience
- Improved page performance
Use Cases:
- Media library grid view
- Image galleries
- Product listings
- Blog post previews
- User avatars
When Enabled:
- Thumbnails created automatically
- Both regular and WebP thumbnails
- Used in media library interface
- Available for frontend use
When Disabled:
- Full-size images used everywhere
- Slower gallery loading
- Higher bandwidth usage
- Simpler file structure
Thumbnail Width
- Type: Number (pixels)
- Default: 300
- Description: Width of generated thumbnails
- Effect: Determines thumbnail dimensions
- Recommendation: 300 for square thumbnails
Common Values:
- 150px: Small thumbnails
- 300px: Standard thumbnails (recommended)
- 400px: Large thumbnails
- 600px: Extra large thumbnails
Considerations:
- Larger thumbnails = better quality but larger files
- Match your design requirements
- Consider mobile display sizes
- Balance quality with performance
Thumbnail Height
- Type: Number (pixels)
- Default: 300
- Description: Height of generated thumbnails
- Effect: Determines thumbnail dimensions
- Recommendation: 300 for square thumbnails
Common Values:
- 150px: Small thumbnails
- 300px: Standard thumbnails (recommended)
- 400px: Large thumbnails
- 600px: Extra large thumbnails
Note: Thumbnails maintain aspect ratio. These dimensions are maximum values.
Upload Limits Section
Maximum File Size
- Type: Number (kilobytes)
- Default: 10240 (10 MB)
- Description: Maximum allowed file size for uploads
- Effect: Uploads larger than this are rejected
- Recommendation: 10240 KB (10 MB) for general use
Size Conversions:
- 1024 KB = 1 MB
- 5120 KB = 5 MB
- 10240 KB = 10 MB
- 20480 KB = 20 MB
- 51200 KB = 50 MB
Recommended Values:
| Use Case | Size (KB) | Size (MB) | Description |
|---|---|---|---|
| General Use | 10240 | 10 | Good for most images |
| High Quality | 20480 | 20 | Professional photography |
| Documents | 51200 | 50 | Large PDFs and documents |
| Restricted | 5120 | 5 | Limited storage |
Important Considerations:
- Server PHP settings may also limit uploads
- Check
upload_max_filesizein php.ini - Check
post_max_sizein php.ini - Ensure server limits are higher than this setting
- Consider available disk space
Common Tasks
Task 1: Configuring Image Optimization
- Navigate to Dashboard > Media > Media Settings
- Locate the Image Optimization section
- Enable Auto-Optimize Images toggle
- Set Image Quality to 85 (recommended)
- Set Maximum Width to 1920 pixels
- Set Maximum Height to 1080 pixels
- Click Save Media Settings at the bottom
Result: All new image uploads will be automatically optimized with these settings.
Task 2: Enabling WebP Generation
- Navigate to Dashboard > Media > Media Settings
- Locate the WebP Generation section
- Enable Generate WebP Versions toggle
- Set WebP Quality to 85 (recommended)
- Click Save Media Settings
Result: All new image uploads will have WebP versions created automatically.
Task 3: Configuring Thumbnails
- Navigate to Dashboard > Media > Media Settings
- Locate the Thumbnail Generation section
- Enable Generate Thumbnails toggle
- Set Thumbnail Width to 300 pixels
- Set Thumbnail Height to 300 pixels
- Click Save Media Settings
Result: All new image uploads will have thumbnail versions created.
Task 4: Adjusting Upload Limits
- Navigate to Dashboard > Media > Media Settings
- Locate the Upload Limits section
- Set Maximum File Size in kilobytes
- For 10 MB: Enter 10240
- For 20 MB: Enter 20480
- For 50 MB: Enter 51200
- Click Save Media Settings
Result: Upload size limit is updated. Files larger than this will be rejected.
Task 5: Optimizing for Performance
For maximum performance:
- Enable Auto-Optimize Images
- Set Image Quality to 85
- Set Maximum Width to 1920
- Set Maximum Height to 1080
- Enable Generate WebP Versions
- Set WebP Quality to 85
- Enable Generate Thumbnails
- Set Thumbnail Width to 300
- Set Thumbnail Height to 300
- Click Save Media Settings
Result: Optimal balance between quality and performance.
Task 6: Optimizing for Quality
For maximum quality:
- Enable Auto-Optimize Images
- Set Image Quality to 90
- Set Maximum Width to 2560
- Set Maximum Height to 1440
- Enable Generate WebP Versions
- Set WebP Quality to 90
- Enable Generate Thumbnails
- Set Thumbnail Width to 400
- Set Thumbnail Height to 400
- Set Maximum File Size to 20480 (20 MB)
- Click Save Media Settings
Result: Higher quality images with larger file sizes.
Task 7: Disabling Processing
To upload files without any processing:
- Disable Auto-Optimize Images
- Disable Generate WebP Versions
- Disable Generate Thumbnails
- Click Save Media Settings
Result: Files are uploaded as-is without any modifications.
Note: This is not recommended for production sites as it can significantly impact performance.
Permissions
Media Settings requires the following permission:
- media.settings: Can view and modify media settings
Only administrators and users with this permission can access and change media settings. Regular users with only media.upload permission will use the configured settings but cannot change them.
Tips and Best Practices
Optimization Strategy
- Enable All Processing: For best results, enable optimization, WebP, and thumbnails
- Use Recommended Quality: 85 provides excellent quality with good compression
- Set Reasonable Limits: 1920x1080 is sufficient for most displays
- Test Your Settings: Upload sample images and check the results
- Monitor File Sizes: Ensure optimized files are significantly smaller
Quality Settings
- Don't Use 100: Quality 100 creates unnecessarily large files
- Don't Go Too Low: Below 70 shows visible quality loss
- Match WebP to Image: Use same quality for consistency
- Consider Your Content: Photography needs higher quality than graphics
Dimension Limits
- Match Your Design: Set limits based on your largest image display size
- Consider Retina: 2x dimensions for retina displays (e.g., 2560x1440)
- Don't Overdo It: Larger than 4K is rarely needed
- Maintain Aspect Ratio: System automatically maintains proportions
Upload Limits
- Check Server Limits: Ensure PHP limits are higher than your setting
- Consider Storage: Larger limits mean more storage usage
- Balance Needs: 10 MB is sufficient for most use cases
- Document Uploads: Increase limit if accepting large PDFs
Performance Impact
- Processing Takes Time: Optimization adds a few seconds to upload
- Storage Increases: WebP and thumbnails use additional storage
- Worth the Trade-off: Performance benefits outweigh processing time
- One-Time Cost: Processing happens once during upload
Troubleshooting
Problem: Settings Not Saving
Possible Causes:
- Missing
media.settingspermission - Form validation error
- Database connection issue
- Cache not clearing
Solutions:
- Verify you have
media.settingspermission - Check for error messages on the page
- Ensure all values are within valid ranges
- Try clearing browser cache
- Check server error logs
- Contact administrator if issue persists
Problem: Optimization Not Working
Possible Causes:
- GD or Imagick library not installed
- PHP memory limit too low
- Image format not supported
- Settings not saved properly
Solutions:
- Verify GD or Imagick extension is installed
- Check PHP memory_limit (recommend 256M or higher)
- Test with standard JPEG or PNG files
- Re-save settings to ensure they're applied
- Check server error logs for specific errors
- Contact system administrator for server configuration
Problem: WebP Not Generating
Possible Causes:
- Server doesn't support WebP
- GD library version too old
- WebP generation disabled
- Image format not compatible
Solutions:
- Verify server supports WebP (PHP 7.0+ with GD 2.1+)
- Check GD library version:
php -i | grep GD - Ensure WebP generation is enabled in settings
- Test with JPEG or PNG files (not GIF or SVG)
- Update PHP and GD library if needed
- Check error logs for specific issues
Problem: Thumbnails Not Creating
Possible Causes:
- Thumbnail generation disabled
- Invalid dimensions
- Memory limit too low
- Storage permission issue
Solutions:
- Ensure thumbnail generation is enabled
- Verify dimensions are positive numbers
- Increase PHP memory_limit if needed
- Check storage directory permissions
- Test with smaller images
- Review error logs for details
Problem: Upload Size Limit Not Working
Possible Causes:
- Server PHP limits are lower
- Web server limits are lower
- Setting not saved properly
- Cache issue
Solutions:
- Check PHP
upload_max_filesizesetting - Check PHP
post_max_sizesetting - Check web server limits (nginx, Apache)
- Ensure setting is saved in database
- Clear application cache
- Restart web server if needed
Problem: Images Too Large After Optimization
Possible Causes:
- Quality setting too high
- Maximum dimensions too large
- Optimization not enabled
- Image format not optimal
Solutions:
- Lower quality setting to 80-85
- Reduce maximum width/height
- Ensure optimization is enabled
- Try converting to JPEG for photos
- Enable WebP for better compression
- Check that settings are being applied
Problem: Images Too Small or Low Quality
Possible Causes:
- Quality setting too low
- Maximum dimensions too small
- Over-compression
Solutions:
- Increase quality setting to 85-90
- Increase maximum dimensions
- Check original image quality
- Disable optimization temporarily to test
- Upload higher quality source images
Related Modules
- Media Library: Upload and manage files with these settings
- General Settings: Other system configuration options
- Cloud Storage: Configure external storage for media files
Quick Start
Get Started in Minutes
Follow these simple steps to get Launchpanel - Laravel Admin Panel & Dynamic Website Starter Kit up and running quickly.
Quick Links
Need More Help?
Our comprehensive documentation covers everything from basic setup to advanced configurations. Check out these additional resources: