Since the file path starts with a slash having gallery_thumbs/0'.$this->storedfile->get_filepath() leads to a double slash in the URL. Starting with Moodle 3.3 (or depending on the config even earlier) it leads to errors which cause the thumbnails to not to be displayed.
Since the file path starts with a slash having
gallery_thumbs/0'.$this->storedfile->get_filepath()
leads to a double slash in the URL. Starting with Moodle 3.3 (or depending on the config even earlier) it leads to errors which cause the thumbnails to not to be displayed.This simple change fixes the issue.