I didn't code that part but normally the script check if the file exists, and if not generate : so you should be able to generate locally in _data/i/...-suffix.ext and upload it. You might have not used the correct suffix, or path
I'm sure the file name and path are correctly, I tried 3 times.
I copy my thumbnail in the cache folder and keep watch it, then, I click the related album, I saw the size of thumbnail files in the cache folder changed one by one, them all thumbnail of that album show up.
Yes, it generated thumbnail again even there were.
I'm looking at the code and i see only one thing :
if ($mtime===false or $mtime < $params->last_mod_time)
$is_cached = false;
I notify the developer of that part
I figured out it.
if you pre generate the thumbnail or othersize (for example websize) in advance and upload to _data\i\galleries, you should make sure those files have a newer date than the original image it self, otherwise piwigo will regenerate it again.