Skip to main content

Integrations

CMS modules for CDN​

On shared hosting, connect WordPress, OpenCart or ocStore through a CMS module. No nginx access is needed: browsers receive CDN URLs directly. The sections below describe a separate reverse proxy setup.

Reverse proxy and Bitrix​

Use a profile alias and an external nginx for existing /upload/... URLs. This example assumes nginx runs on the same host and zorka is published on 127.0.0.1:8088:

location /upload/ {
proxy_pass http://127.0.0.1:8088;
proxy_set_header Host $host;
proxy_set_header Accept $http_accept;
proxy_set_header X-Request-ID $request_id;
}

There is deliberately no trailing / in proxy_pass, preserving the original /upload/... path. Use the service address instead of loopback inside a container network. Do not publish the admin listener through this route.

Before replacing a production route, test a separate instance, source permissions and the mapping between UPLOAD_DIR and your actual Bitrix directory. Roll back by restoring the previous proxy route.

HTML and responsive images​

<img src="/upload/product.jpg"
width="1200" height="800"
loading="lazy"
alt="Product description" />

HTML width and height reserve layout space; they do not resize the file on the server. For srcset, supply separate source images at the required sizes or use a separate resizing tool.

Do not automatically lazy-load your above-the-fold image; evaluate the effect on LCP.

Next.js​

Choose which layer handles image processing. If zorka performs format conversion and compression, use a plain img or Image with unoptimized and known dimensions:

import Image from 'next/image';

<Image
src="/upload/product.jpg"
alt="Product description"
width={1200}
height={800}
unoptimized
/>

Your proxy must route /upload/ to zorka. A loader adding w, h or q parameters is incompatible with the current zorka API. If you also need Next.js resizing, account for the extra processing step and inspect the final quality.

Verify the integration​

  1. Check X-Image-Profile to confirm the selected profile.
  2. Inspect Content-Type, Vary: Accept and repeated cache hits.
  3. Compare transfer size, visual quality and LCP on the same pages.
  4. Test source failures and your route rollback procedure.