Skip to content

Commit

Permalink
fix: parse .env variables in image transforms
Browse files Browse the repository at this point in the history
Resolves #1.
  • Loading branch information
thomasvantuycom committed Jul 26, 2023
1 parent 9de1d43 commit e6179f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/imagetransforms/CloudinaryTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Cloudinary\Cloudinary;
use Cloudinary\Transformation\Gravity;
use Cloudinary\Transformation\Resize;
use Craft;
use craft\base\Component;
use craft\base\imagetransforms\ImageTransformerInterface;
use craft\elements\Asset;
Expand Down Expand Up @@ -73,9 +74,9 @@ protected function client($cloudName, $apiKey, $apiSecret): Cloudinary
{
$config = [
'cloud' => [
'cloud_name' => $cloudName,
'api_key' => $apiKey,
'api_secret' => $apiSecret,
'cloud_name' => Craft::parseEnv($cloudName),
'api_key' => Craft::parseEnv($apiKey),
'api_secret' => Craft::parseEnv($apiSecret),
],
];

Expand Down

0 comments on commit e6179f3

Please sign in to comment.