craft-imageoptimize
craft-imageoptimize copied to clipboard
Imgix - Domain name checking
On entering my imgix source, I incorrectly entered the protocol as well.
This errored the site with a
InvalidArgumentException: Domain must be passed in as fully-qualified domain name and should not include a protocol or any path element, i.e. "example.imgix.net".
From vendor/imgix/imgix-php/src/Imgix/UrlBuilder.php
on line 37.
Should there by a pre-check before saving? Had to manually edit the project.yaml
file and revert back
We should either validate this, or strip the protocol before passing it in -- and at least throw a try/catch around it.
+1 for this. Going to make a PR for the Docs to make the requirement clearer.