[WordPress] - Wanna save $2850 on BunnyCDN Image Optimization? Read This!

Dopious

Elite Member
Jr. VIP
Joined
Apr 4, 2009
Messages
13,911
Reaction score
70,946
So, I´ll make this guide short to the point.

We all know that the image optimization Bunny Optimizer add-on at BunnyCDN costs $9.50 per month ($114/Year) per domain you use it on, it can be a bit expensive if you have like me 25 domains using their CDN (Would total $2850 per year) just for my image optimization, but I get the service for FREE, here´s how I do it.

I use ShortPixel AI, they have recently changed their CDN delivery operator to BunnyCDN, with that move, they are only charging for bandwidth (not per optimized image) nowadays, since BunnyCDN is doing the optimization for them with the BunnyCDN Optimzer, you can use their CDN pricing if you want, but cheap as I am, I use my account with BunnyCDN instead, price on ShortPixel $0.07´ish, price on BunnyCDN $0.01 in Europe and North America per GB.

Make a new zone in BunnyCDN name for example HOSTNAME "imgdomain.b-cdn.net" and ORIGIN URL "https://no-cdn.shortpixel.ai" and set the zone up.

Then go to your domains DNS setting with your DNS provider and make a CNAME "images.yourdomain.com" CNAME "images" to "imgdomain.b-cdn.net." and save.

Go back to your zone at BunnyCDN and add a custom hostname "images.yourdomain.com" to your zone, add a SSL and activate it.

In ShortPixel Settings under "Behavior" and "API URL" use the the API URL ""https://images.yourdomain.com/spai" that you just made in your BunnyCDN Custom Hostname, and save.

Make sure you use your API token from your ShortPixel account in the setting for the ShortPixel AI plugin to.

Their pricing on some pages and text´s are not fully updated yet, but it will be.

So, if your like me, having 25 domains at BunnyCDN, you just SAVED $2850 per year.

Ps. If I missed something/written something dumb in this small newbie guide, just call me an asshole in the thread and tell me to explain, I´m a dumb fck sometimes on friday nights, when I have my friend Captain Morgan over for a chat.
 
Last edited:
Can it be used with shortpixel image optimizer? I want to optimize images in my media library and replace original images with optimised images
 
when I have my friend Captain Morgan over for a chat.

Just by reading I have not understood it at first, but it looks great at fiurst

But still I'm not 100% sure if I have understood it, but it seems you do too many steps just to end in the same place.

First you do this

Make a new zone in BunnyCDN name for example HOSTNAME "imgdomain.b-cdn.net" and ORIGIN URL "https://no-cdn.shortpixel.ai" and set the zone up.

Then you do this:

Then go to your domains DNS setting with your DNS provider and make a CNAME "images.yourdomain.com" CNAME "images" to "imgdomain.b-cdn.net." and save.

And finally

In ShortPixel Settings under "Behavior" and "API URL" use the the API URL ""https://images.yourdomain.com/spai" that you just made in your BunnyCDN Custom Hostname, and save.

You are doing a circle

By default, with shortpixel use: https://no-cdn.shortpixel.ai/spai for the CDN

But what you do is:

1. You send https://no-cdn.shortpixel.ai to => imgdomain.b-cdn.net
2. Then you send imgdomain.b-cdn.net to => images.yourdomain.com
3. Finally you use images.yourdomain.com/spai

If you see transitionally doing this is the same as not doing anything at all (except the fact that you are using your own subdomain instead of no-cdn.shortpixel for the URLs)

Don't see many advantages, many DNS resolving in the process in the end no-cdn.shortpixel.ai will need to be solved anyway

Can it be used with shortpixel image optimizer? I want to optimize images in my media library and replace original images with optimised images

Nope, this won't be of use in this case.

The nice thing about using Bunny CDN image feature straightforward (without Shortpixel), is the fact that you could serve your images straightly from the CDN for example, cdn.example.com meaning, that you could use without the need of any other plugin, just a simple URL replacing plugin like most caching offer (like WP-Rocket).
 
I want to optimize images from media library instead of serving from cdn
 
Just by reading I have not understood it at first, but it looks great at fiurst

But still I'm not 100% sure if I have understood it, but it seems you do too many steps just to end in the same place.

First you do this



Then you do this:



And finally



You are doing a circle

By default, with shortpixel use: https://no-cdn.shortpixel.ai/spai for the CDN

But what you do is:

1. You send https://no-cdn.shortpixel.ai to => imgdomain.b-cdn.net
2. Then you send imgdomain.b-cdn.net to => images.yourdomain.com
3. Finally you use images.yourdomain.com/spai

If you see transitionally doing this is the same as not doing anything at all (except the fact that you are using your own subdomain instead of no-cdn.shortpixel for the URLs)

Don't see many advantages, many DNS resolving in the process in the end no-cdn.shortpixel.ai will need to be solved anyway



Nope, this won't be of use in this case.

The nice thing about using Bunny CDN image feature straightforward (without Shortpixel), is the fact that you could serve your images straightly from the CDN for example, cdn.example.com meaning, that you could use without the need of any other plugin, just a simple URL replacing plugin like most caching offer (like WP-Rocket).

Bunny cdn doesn't optimize images. It's image optimizer costs a lot.
 
If you see transitionally doing this is the same as not doing anything at all (except the fact that you are using your own subdomain instead of no-cdn.shortpixel for the URLs)
I like my own subdomain, that´s why I do it my way, otherwise I could just use ShortPixel AI the default way.

Using BunnyCDN Optimizer direct would have been the optimal, but that would cost me over $2800 yearly for all my domains, as they are $114 per year, per domain in cost.

Thats why I wrote the guide.
 
Last edited:
I like my own subdomain, that´s why I do it my way, otherwise I could just use ShortPixel AI the default way.

Just use ShortPixel´s regular plugin then.
That's paid plugin. This trick only requires bunny cdn. No need to pay for credits.
 
That's paid plugin. This trick only requires bunny cdn. No need to pay for credits.
The regular plugin gives you 100 free credits per month, also one-time buy´s of credits are very cheap, like $10 for 10.000 images, no need for monthly.
 
Last edited:
Using BunnyCDN Optimizer direct would have been the optimal, but that would cost me over $2800 yearly for all my domains, as they are $114 per year, per domain in cost.

Yep, but be aware, that is not the same by any means.

I've tons of SP credits and been using SPIO lately with WebP formats (WebP Express), and since SPAI its almost useless, I'm just using the SP credits for the optimization of the files in all my sites, and bunny CDN to just serve the images (which is not a huge price, since they are pretty good priced overall).

Just don't optimize with them. You can use SPIO for the optimization purpose, WebP Express to have it everything on place and fine-tuned, and Bunny CDN to serve WebP or JPEG based on the UserAgent (they are really efficient for this) and you will be spending more than what you already are.

Seriously, SPAI sucks, their algo sucks and I have 99% of the times issues with certain CSS properties like certain backgrounds under certain plugins (like Oxygen Builder) specially for WebP rewrites. I prefer to rewrite CDN/WebP URLs, myself and be aware they are 100% working. After many years testing, I've got to the conclusion that any current Adaptive Image solution is completely unworthy. They don't even save you time because ultimately, since the algo renders on the fly, sometimes two different renders will return two different speed results.

Also, I had one of my client sites based on SPAI with literally 100K photos being served with SPAI. When I decided to switch to SPIO I discovered that any of the images served, wasn't already optimized locally, so I had to spend a huge amount of money having to optimize what I've been serving for nearly 3 years already (which should have been free because they were technically optimized on the fly at the moment they were served).

* SPIO = ShortPixel Image Optimization plugin
* SPAI = ShortPixel Adaptive Images plugin
 
Yep, but be aware, that is not the same by any means.

I've tons of SP credits and been using SPIO lately with WebP formats (WebP Express), and since SPAI its almost useless, I'm just using the SP credits for the optimization of the files in all my sites, and bunny CDN to just serve the images (which is not a huge price, since they are pretty good priced overall).

Just don't optimize with them. You can use SPIO for the optimization purpose, WebP Express to have it everything on place and fine-tuned, and Bunny CDN to serve WebP or JPEG based on the UserAgent (they are really efficient for this) and you will be spending more than what you already are.

Seriously, SPAI sucks, their algo sucks and I have 99% of the times issues with certain CSS properties like certain backgrounds under certain plugins (like Oxygen Builder) specially for WebP rewrites. I prefer to rewrite CDN/WebP URLs, myself and be aware they are 100% working. After many years testing, I've got to the conclusion that any current Adaptive Image solution is completely unworthy. They don't even save you time because ultimately, since the algo renders on the fly, sometimes two different renders will return two different speed results.

Also, I had one of my client sites based on SPAI with literally 100K photos being served with SPAI. When I decided to switch to SPIO I discovered that any of the images served, wasn't already optimized locally, so I had to spend a huge amount of money having to optimize what I've been serving for nearly 3 years already (which should have been free because they were technically optimized on the fly at the moment they were served).

* SPIO = ShortPixel Image Optimization plugin
* SPAI = ShortPixel Adaptive Images plugin
Yes, I have used SPIO to pre-optimize my images in a low compression mode, and then used SPAI to serve them automaticly size adjusted for years, having no problems with CSS or webP as you mention for years. I guess we have different experience there about it.
 
Yes, I have used SPIO to pre-optimize my images in a low compression mode, and then used SPAI to serve them automaticly size adjusted for years, having no problems with CSS or webP as you mention for years. I guess we have different experience there about it.

You use both plugins at the same time?
You might have, like me, a million credits therefore don't mind on wasting them, but technically just with SPAI it does it on the fly (both serving them compressed and WebP renders)
The problem is that it fails. I have to admit that I have a huge of coded customizations in my Wordpress installs so I tend to find a zillion bugs in all plugins including this. This is why I can tell most of the time which plugins are problematic. I understand that for general use, adaptive images system might be ok.
 
You use both plugins at the same time?
You might have, like me, a million credits therefore don't mind on wasting them, but technically just with SPAI it does it on the fly (both serving them compressed and WebP renders)
Yes, I use both plugins, SPOI for a pre-compression in lower compression, then SPAI for higher compression and serving, I pre-compress in lower compression, to get the image to SPAI faster. Works well for me. Read more here...
 
Last edited:
So you piggyback one off the other and it's a huge saving.

Well done Capt Morgan for letting you into this secret.

Ever tried genuine Pussers Rum?
 
Yes, I use both plugins, SPOI for a pre-compression in lower compression, then SPAI for higher compression and serving, I pre-compress in lower compression, to get the image to SPAI faster. Works well for me. Read more here...

Are you using this solution?

  • If you already used Lossy or Glossy with SPIO and you plan on keeping SPIO installed together with SPAI, you should set SPAI to Lossless to prevent over-compression.
 
I need to read on CDN's but thanks for the share OP, and your plugins shares btw, you're Festinger's worthy pupil.

I have a question do we need an image optimizer in the first place if we compress our images via a tool like tinypng before uploading them on WP? It's to compress them even more and gain even more speed? Why their add-on is so expensive?
 
Awesome! I'm using the $15 tinify package right now, but this looks better.
 
Back
Top