Home > The Newbie Zone > Questions and Answers

Hosting Images on CDN to improve Landing page speeds (5)


01-21-2017 03:35 AM #1 thetailend (AMC Alumnus)
Hosting Images on CDN to improve Landing page speeds

Hey guys, Excuse my technically challenged brain.

I've been using the Amazon AWS S3 bucket + Cloudfront CDN to host and deliver my landers.

I've also been using Adplexity to rip landers.

My Question is: When people say that you should 'host your images on your CDN for speed', what exactly does this mean?


Scenario: I rip a lander off Adplexity and I download the folder which contains the index.html file + 5 images.

How do I then host these images 'on my CDN'?

Should I just put the images in my S3 bucket along with the index.html file (all in the same folder) and then make sure my HTML points to the images? (the same structure you would make if using your own server)

Or

Add the images to a CDN then link to them from the html (<img src="xxxx" />) ?

A little confused on this. Thanks


01-21-2017 03:48 AM #2 thetailend (AMC Alumnus)

I'm going to have a go at answering my own question (weird, I know) and if i'm wrong or right maybe someone will let me know..

If I just create a folder in my S3 bucket called 'images' and put all of my images there, each image will have its own url....then I can just link to those in my landers.

Does that ensure my images load fast?

Thanks


01-21-2017 03:58 AM #3 erikgyepes (Moderator)

So if you are hosting all your landing page on CDN already that mean your images are hosted there and it doesn't matter if they are in /images subfolder or no.

Different situation would be if your landing page (index.html) would be hosted on VPS and then images on CDN.

Then you would have to point your images URLs to the CDN.

Does it make sense?


01-22-2017 06:12 AM #4 danielt (Member)
Hosting Images on CDN to improve Landing page speeds

To use AWS as it seems you are familiar with it, this is how a request looks like now:

user browser > s3 bucket ( every request ) > lp > image

with CDN

user browser > cloudfront ( every request ) > s3 bucket ( only the first request ) > lp > image

cloudfront is AWS' cdn, s3 is just a normal server you would have.

think of it like this: all your images are your favourite skittles in the downtown mall. to get them, you have to go on a highway, sit in line, park, go in, get skittles, hurry back - this is without cdn. ( do get dressed )

with cdn - your favourite skittles are at the small local shop you have 2 minutes from you because the owner sells them there ( made a copy ) - this means no more traffic, time wasted with roundtrips. ( pijama trip )

skittles heaven


01-22-2017 06:21 AM #5 danielt (Member)

further more, yes your URL to your resources will need updating but this is easy. think in funnel vission and entry points;

first the user accesses a subdomain that is an a alias in route53 for a cloudfront distribution.

the the cloudfront distrib takes its data from the s3 bucket.

use route53 in AWS to manage your DNS - ie where your URL points to


Home > The Newbie Zone > Questions and Answers