I can not show a PNG animation with APNG format.
After upload the internal data of file is stripped and that breaks animation.
When an image is uploaded by a user, it is placed in one folder /public/uploads/files.
However, a folder can often contain a limited number of files and directories, say 64,000. And searching for a file is slower when there are many files in a directory.
Usually, uploaded files are placed into subdirectories:
Though, I checked now.
I can create 1 million files in a directory on my Ubuntu box with the ext4 file system.
So, it should work with the current configuration.