if ( isset( $image['position'] ) && 0 == $image['position'] ) {
                    $attachment_id = isset( $image['id'] ) ? absint( $image['id'] ) : 0;

                    if ( 0 === $attachment_id && isset( $image['src'] ) ) {
                        $upload = $this->upload_product_image( esc_url_raw( $image['src'] ) );