APNG not available after clicking play

DeCysos

Phoenix Foto Service
Beta tester
▶🚶‍Reproduction steps
  1. go to: https://demo.chevereto.com/search/images/?q=apng
    or go to https://demo.chevereto.com/ and search at "apng"


    The pictures are probably in a file size (dimensions and size) that the script no longer makes a reduction and instead also shows the original in the preview.
😢Unexpected result

9cd7392a-c1cb-475c-bfae-e8ff63fd58f8.png
For the first time, some pictures are already animated.
When you finally press the play button, the picture is no longer available.


📃Error log message

--
 

Rodolfo

Chevereto Developer
Chevereto Staff
Kindly provide the images to test for false positives (real original images, not the uploaded ones).
 

DeCysos

Phoenix Foto Service
Beta tester
Computer:
Cube: https://www.rgb-labs.com/wp-content/uploads/2019/01/animation_apng.png
The another cant find now.

But i have the the imageurl after click on play is: tps://demo.chevereto.com/images/2019/12/20/ezgif-6-e91f8a1dd32f.png
before: https://demo.chevereto.com/images/2019/12/20/ezgif-6-e91f8a1dd32f.png

However, it works on my test page.: https://beta.pfs.red/search/images/?q=apng
Even if they are already moving ;)

I uploaded the pictures again, there is no error.
I still leave the errors on the demo until they are fixed.
There must be a reason why this is so.
 
Last edited:

Rodolfo

Chevereto Developer
Chevereto Staff
It works at my end (the play thing), however I'm seeing conflicts related to the actual file extension. The rewrite rules are having issues with "png" in the name of the file, at least in the demo this is caused by the nginx rewrite rule.

I will patch it for 3.14.2
 
  • Like
Reactions: rdn

Rodolfo

Chevereto Developer
Chevereto Staff
Sure,

server block:
    # Image not found replacement
    location ~ \.(jpe?g|png|gif|webp) {
            log_not_found off;
            error_page 404 /content/images/system/default/404.gif;
    }
After changing that run this command:

systemctl reload nginx
 
  • Like
Reactions: rdn

rdn

Core license
License owner
This will not work the same?
NGINX:
location ~* \.(gif|jpg|jpeg|png|ico|webp)$ {
      gzip_static off;
      add_header Access-Control-Allow-Origin *;
      add_header Cache-Control "public, must-revalidate, proxy-revalidate, immutable, stale-while-revalidate=86400, stale-if-error=604800";
      access_log off;
      expires 30d;
      log_not_found off;
      error_page 404 /content/images/system/default/404.gif;
      break;
    }
Taken from here:
https://github.com/centminmod/centminmod/blob/123.09beta01/config/nginx/staticfiles.conf
 

rdn

Core license
License owner
Still differ:
  • ~: If a tilde modifier is present, this location will be interpreted as a case-sensitive regular expression match.
  • ~*: If a tilde and asterisk modifier is used, the location block will be interpreted as a case-insensitive regular expression match.
 

Rodolfo

Chevereto Developer
Chevereto Staff
Sure, but our file extensions are always lowercase ;)
PHP:
    function get_file_extension($file)
    {
        return strtolower(pathinfo($file, PATHINFO_EXTENSION));
    }
I always try to stick to one standard, and lower-casing the file extensions was a must that was settled very long ago.
 
  • Love
Reactions: rdn
Top