In #5, one try to find duplicate entries in $tpl_thumbnails_var based on the name of the picture.
Unfortunately, $tpl_thumbnails_var['name'] can be empty and in that case every picture with a empty name will be considered as duplicate and won't be shown.
It is probably better to use $tpl_thumbnails_var['NAME'] that seems to be always set (the actual name if defined or a name derived from the the filename otherwise).
In #5, one try to find duplicate entries in
$tpl_thumbnails_var
based on the name of the picture. Unfortunately,$tpl_thumbnails_var['name']
can be empty and in that case every picture with a empty name will be considered as duplicate and won't be shown.It is probably better to use
$tpl_thumbnails_var['NAME']
that seems to be always set (the actual name if defined or a name derived from the the filename otherwise).