Smart CDN OptiPic

CDN OptiPic — simple solution to the problem "Serve images in next-gen formats"
Smart WebP convertation on the fly
What does OptiPic CDN do when trying to request an image from it:
  • Returns the WebP version of the image.
    if the browser supports WebP format
  • Returns a compressed version without webp
    if the browser does not support WebP
  • Makes responsive to mobile screens
    if the image is opened from a mobile
  • Caches and speeds up loading
    reducing the load from your hosting
Convertation to Webp and image compression occurs in the background and does not slow down the opening of images on the browser.
If the optimized version is not yet ready at the time of the image request, the original version is returned without any processing.
What gets optimization of images on the site
  • Speeding up
    the site
  • Improving
  • Increasing
    of conversion
  • Increasing of Google
    Pagespeed Insights

How does the CDN OptiPic work?

Converts to WebP - the next-gen image format
Solves the problem "Serve images in next-gen formats" in Google Pagespeed Insights

If a visitor to your site uses a browser that supports the WebP format, then the CDN gives him exactly the WebP versions of the images (WebP versions are generated automatically on the CDN side).


Why is it worth using WebP?


Using Webp solves the "Use Modern Image Formats" issue in Google Pagespeed Insights.


In short, WebP compresses the file better, all other things being equal, than older formats (png and jpeg) - which means it takes up less space on the hosting and loads faster in the browser when viewing the page.


The implementation of WebP is actively promoted by Google - they provide such statistics:

  • WebP compresses images losslessly 26% better than PNG.
  • WebP compresses lossy images better than JPEG by 25-34% with the same structural similarity index (SSIM)
  • WebP supports lossless transparency (known as alpha) with a size increase of only 22%.

Compresses images

If the visitor’s browser does not support Webp, then the visitor is given the images in the original format (png / jpeg), but pre-compressed / optimized.

Adapts for mobile phones

If the visitor opens the site from a mobile phone, then the images are not only automatically compressed or converted to Webp, but also automatically reduced in width (to speed up the download of images even more on the mobile Internet)

Caches and speeds up loading

Images will not be converted, optimized and compressed on the fly every time with every request. All of these procedures will be performed by the CDN once for the requested image. In the background, so as not to slow down the delivery of images to the visitor of your site.

How to connect CDN OptiPic?

Option #1: Use the plugin for your CMS

Option #2: Universal connection through PHP (GitHub library)

The URLs of the images on the site change automatically. It is enough just to add 1 line to your .htaccess or php.ini.

Connection example via .htaccess

php_value auto_prepend_file "<SITE_ROOT_DIRECTORY>/optipic-cdn-php/optipic-cdn-php/auto_prepend_file.php"

Connection example via php.ini

; Automatically add files before PHP document.
auto_prepend_file = <SITE_ROOT_DIRECTORY>/optipic-cdn-php/optipic-cdn-php/auto_prepend_file.php
Library on GitHub
free integration on request

Option #3: Universal connection through Nginx proxy

URLs of images on the site do not change. Just now all image traffic is automatically proceed to OptiPic CDN
# OptiPic CDN: insert it before the Server structure
upstream cdn_optipic { server; }

# OptiPic CDN: insert it into the Server structure
location  ~* \.(png|jpg|jpeg)$ {
    set $host_value "";
    set $from_optipic "yes"; # to disable CDN OptiPic - set "no" value
    if ($arg_no_optipic) {
        set $from_optipic "no";
        set $host_value $host;
    proxy_redirect     off;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host_value;
    if ($from_optipic = "yes") {
        rewrite ^/(.*) /site-XXXXXX/$1 break;
        proxy_pass http://cdn_optipic;
    # get-param ?no_optipic=1 - get image from your hosting directly (without CDN OptiPic)
    try_files $uri 404;
XXXXXX — ID of your site in your CDN OptiPic account
We strongly recommend that you check the correctness of the new version of the config before rebooting nginx. You can do this with the command nginx -t.
Soft reload (re-read configs) Nginx can be by command nginx -s reload

Nginx proxy documentation
Get free help in connecting
Check if image is loading via OptiPic CDN
Get free integration
even on a free tariff

Option #4: Just change the URL of the images on your site!

It was
not optimized

<img src="/upload/foo/bar/image.png">

It has become
automatically optimized

<img src="//">
XXXXXX — ID of your site in your CDN OptiPic account

Get started now with the FREE package

One-time payment — no monthly fees
The purchased package does not burn out at the end of the month - it is advantageous to purchase it several months in advance

You pay for views from CDN images. The total cost of use depends on the amount of traffic to your site. On average, this is from $1.5 per 1,000,000 image views.
The first demo of 100,000 views is free.

$10.00 $5.00


$14.00 $7.00


$24.00 $12.00


$40.00 $20.00


$74.00 $37.00


$165.00 $82.00


$235.00 $117.00


$282.00 $141.00

Why choose us?

Rating — 4.55 (122 reviews)

Contact us to get a free consultation