A
A
Anton B2015-12-03 15:39:12
Nginx
Anton B, 2015-12-03 15:39:12

Is it possible to force nginx to return base64 images?

Hello.
Is it possible to somehow configure nginx so that, for example, site.ru/images/1.png returns an image, and site.ru/images/1.png.base64 returns an image, but with a base64 string?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Egor Kazantsev, 2015-12-03
@saintbyte

why not immediately generate and stupidly give it as static?

S
sim3x, 2015-12-03
@sim3x

The number of images does not increase, or increases slightly, or increases and all of them are often requested
- make base64 at once and make gzip -9 (1.png.base64.gz)
If there are many images and not all of them are requested
- do dynamic generation with result caching

A
Andrey Burov, 2015-12-03
@BuriK666

Out of the box, he does not know how.
There is a module: https://github.com/timebug/base64-nginx-module

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question