To install Magento 2 Image Optimization Extension by Magefan, please follow the Magento 2 WebP Images Extension Installation and Magento 2 Image Lazy Load Extension Installation.