How Images are Served from AWS on Staq
Images on Staq are stored both locally on the server and on AWS S3 buckets. This dual storage system ensures efficient delivery and backup of media files. Additionally, if the CDN is enabled, images are also cached on CloudFront for faster distribution.
Default Configuration
Upon uploading an image to the website or during migration, images are automatically transferred to both the local server and AWS S3 buckets. By default, images are served from AWS S3 buckets with a AWS S3 branded URL.
If you prefer to change the default AWS S3 URLs for images, Staq offers several options:
Option 1: Disable Rewrite Media URLs
If you lack DNS/domain access or prefer not to move DNS to Staq, you can disable AWS S3 URLs since the images also exist locally on the server.
You can refer to this knowledge base article on how to remove AWS S3 links from your WordPress site.
Option 2: Launch Traditional CDN
For users with DNS access but are unable to move DNS to Staq, launching Traditional CDN is a viable solution. This option replaces the default S3 URLs with CDN URLs, resulting in cleaner image URLs. Learn more about setting up Traditional CDN here.
Option 3: Enable Staq Next-Gen CDN
Users with domain access and the ability to move DNS to Staq can opt for Staq Next-Gen CDN. This advanced CDN solution serves images seamlessly from both S3 and CloudFront, providing optimized performance without revealing the underlying infrastructure. Once enabled, image URLs resemble conventional URLs, enhancing user experience but don’t be fooled! They are being served from AWS CloudFront and not the server.
Conclusion
By understanding how images are stored and served from AWS on Staq, users can choose the option that best aligns with their preferences and requirements. Whether opting for default S3 URLs, Traditional CDN, or Next-Gen CDN, Staq provides flexible solutions to enhance website performance and customization.