Page speed recommendations often lead us down the path of optimizing images. Ensuring images are compressed and the file size is small enough to not increase the page load time. This piece of advice is generic and not specific to Shopify stores.
It's such a common recommendation that you'll find many image compression apps in the app store it's almost comical. I searched for "image optimizer" and found over 300 apps in the app store.
Shopify already does picture compression your images and has been for the last few years. As long as the images are on Shopify's platform, you're reaping the rewards of their image optimization and it's free.
A quick way to tell is to look at the URL of your image and the source should have your domain and
/cdn/shop. You can also right click on a page and select Inspect. Go to Network and select Images. You may need to select the trash can so you start with nothing in the network tab. Then refresh your page. Look at all the domains and you should see `cdn.shopify.com` or your own domain.
Images from any other location are not on Shopify's platform. So you may be missing out on Shopify's optimization. That's one reason why JSON-LD for SEO doesn't require any image uploading. We want you to use images from Shopify's CDN. If you're not sure if an app is using Shopify's CDN, ask them.
That doesn't mean you should never compress or resize your images yourself. For one, Shopify has a maximum file upload of 20MB so if you're image is above that, you can't even upload it to Shopify. If the image is too big to upload you'll want to resize it to a more manageable size first. Alternatively, it could be a print image which typically has larger file sizes than what's needed for the web (they squeeze in more pixels per inch). So you may need to compress or resize images manually from time to time, but this is likely rare and shouldn't require you to install an app.
When it comes to Shopify product image size and Shopify image sizes in general, a good rule of thumb is to keep your image sizes less than 1-2MB or approximately 2000px by 2000px. These aren't exact, just a rough guideline.