Improve website performance in WordPress by hosting images on a subdomain

rapkishor

Regular Member
Joined
May 27, 2020
Messages
276
Reaction score
82
Hey I want to load my images in subdomain. For Example: xyz.com subdomain will be images.xyz.com. when i post any image on my main domain the image will be stored on my subdomain.
Something look like that :
Initial image: <img src="/images/testimage.png" />
Referenced image:<img src="http:// images.xyz.com/images/testimage.png" />



Can anyone guide me i can do it on wordpress so that my website respond fast. I don't want to use any plugin.
 
You can use shortpixel image compressor instead
Just bulk import and compress them all at once
 
Hey I want to load my images in subdomain. For Example: xyz.com subdomain will be images.xyz.com. when i post any image on my main domain the image will be stored on my subdomain.
Something look like that :
Initial image: <img src="/images/testimage.png" />
Referenced image:<img src="http:// images.xyz.com/images/testimage.png" />



Can anyone guide me i can do it on wordpress so that my website respond fast. I don't want to use any plugin.
try this...

Step1: keep your images in the subdomain you want with same folder structure of now.
Step2: use any search and replace wp plugin once to, find and replace

Find :
domain.com/images/


Replace:
images.domain.com/images/

like depends on how you used the images on your website.
 
You can use shortpixel image compressor instead
Just bulk import and compress them all at once
This is the good suggestion. It works for almost all small to medium sized blogs.

@rapkishor Unless you have a huge number of images that is causing you speed issue, you should not bother about this subdomain thing.

How many images do you have on your server BTW?
 
Back
Top