S
S
Sergesssseeerrrgg2020-04-17 19:03:15
Nginx
Sergesssseeerrrgg, 2020-04-17 19:03:15

Ngx_pagespeed rewrites original imgs to inline base 64, but for some reason some imgs are not displayed?

When pagespeed on is enabled, an incomprehensible moment occurs, and not on all images, but on some.
As you can see in the photo, the image is not loaded, although the binary string is written in the src attribute (shortened by dots so as not to litter the message) src="data:image/webp;base64,................ .jpg"

5e99cf9688626513475889.jpeg

Moreover, the settings of the module are quite ascetic
pagespeed on;
pagespeed FileCachePath "/var/cache/ngx_pagespeed/";

A similar malfunction works simultaneously in conjunction with both nginx-1.16.1 with the latest version of pagespeed and nginx-1.17.10. I tried to build nginx both with a dynamic module and with a regular one. They don't work the same.
The folder exists with the necessary permissions "/var/cache/ngx_pagespeed/";
drwxr-xr-x 4 nginx nginx 62 Apr 17 17:43 ngx_pagespeed/

Therefore, there are no errors in the nginx logs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergesssseeerrrgg, 2020-04-17
@Sergesssseeerrrgg

Update. Caught more accurately the error. The problem occurs precisely when the rewrite_images filter is enabled. Specifically, when an image is loaded by a script on an event. Initially loading page loads correctly. But when the src attribute of the image is changed by an event to something different from the original one, the image is not displayed, and it does not give any errors to the logs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question