Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facing image loading issue from AWS S3

I have API in php and in that API I have upload images in AWS S3 is working as expected, however fetch data from S3 it takes too much time to load on a mobile device.

Can any one help me to fixed slow image load issue?

I'm looking best way to load fast image in android and IOS.

Note: I'm not using any thumb for image.

like image 323
khushboo Avatar asked Mar 26 '19 05:03

khushboo


2 Answers

As you have mentioned image on mobile is taking time as this can be due to different sizes for different screen sizes. Ideally you should look forward for following options:

1) resize the images to the target size (thumbnail, preview, full size, ...) and have different sizes for different screen sizes.

2) use compression to compress your existing image file

3) Best option is to integrate CDN for Cloud-based image acceleration and delivery service.

Ideally, Using a CDN like Cloudfront is the first step towards accelerating images.

like image 103
Yash Bindlish Avatar answered Oct 16 '22 19:10

Yash Bindlish


Use of single image size which is basically proportioned for a full desktop, results in slow loading as the image is larger than it needs to be for mobile. As a result, pages and images load slowly.

The best way you can load the fast image from your S3 bucket is using “AWS CloudFront” service.

CloudFront speeds up content delivery by leveraging its global network of data centers, known as edge locations, to reduce delivery time by caching your content close to your end users.

For deployment of CloudFront distribution please refer the below link: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GettingStarted.html

like image 1
Aress Support Avatar answered Oct 16 '22 20:10

Aress Support