Move the thumbnail mode check to a separate method