enhanced image thumbnail handling