public function updateImageAttribute($eavSetup)
    {
        $productImageAttributeId = $eavSetup->getAttributeId(\Magento\Catalog\Model\Product::ENTITY, 'image');
        $setup = $eavSetup->getSetup();

        $setup->getConnection()->update(
            $setup->getTable('catalog_eav_attribute'),
            ['is_used_for_promo_rules' => 1, 'is_searchable' => 0, 'is_used_in_spellcheck' => 0],
            $setup->getConnection()->quoteInto('attribute_id = ?', $productImageAttributeId)
        );
    }
public function updateImageAttribute($eavSetup)
    {
        $productImageAttributeId = $eavSetup->getAttributeId(\Magento\Catalog\Model\Product::ENTITY, 'image');
        $setup = $eavSetup->getSetup();

        $setup->getConnection()->update(
            $setup->getTable('catalog_eav_attribute'),
            ['is_used_for_promo_rules' => 1, 'is_searchable' => 0, 'is_used_in_spellcheck' => 0],
            $setup->getConnection()->quoteInto('attribute_id = ?', $productImageAttributeId)
        );
    }
public function updateImageAttribute ( $ eavSetup ) { $ productImageAttributeId = $ eavSetup -> getAttributeId ( \ Magento \ Catalog \ Model \ Product :: ENTITY , 'image' ) ; $ setup = $ eavSetup -> getSetup ( ) ; $ setup -> getConnection ( ) -> update ( $ setup -> getTable ( 'catalog_eav_attribute' ) , [ 'is_used_for_promo_rules' => 1 , 'is_searchable' => 0 , 'is_used_in_spellcheck' => 0 ] , $ setup -> getConnection ( ) -> quoteInto ( 'attribute_id = ?' , $ productImageAttributeId ) ) ; }
Update Product 'image' attribute and set it searchable.

@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
Update Product image attribute and set it searchable .