Adding thumbnail with the right file extension