craft-imageoptimize icon indicating copy to clipboard operation
craft-imageoptimize copied to clipboard

Imgix - Domain name checking

Open Coysh opened this issue 4 years ago • 2 comments

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

Coysh avatar May 26 '20 16:05 Coysh

We should either validate this, or strip the protocol before passing it in -- and at least throw a try/catch around it.

khalwat avatar Jun 08 '20 12:06 khalwat

+1 for this. Going to make a PR for the Docs to make the requirement clearer.

alexwybraniec avatar Jun 04 '21 11:06 alexwybraniec