Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit b04d730

Browse files
Updated to fix the pathing issue highlighted by the folks at EE
1 parent faa17ef commit b04d730

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

system/expressionengine/third_party/easy_cloudinary/pi.easy_cloudinary.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'pi_version' => '1.0',
2222
'pi_author' => 'Aaron Gustafson',
2323
'pi_author_url' => 'https://www.aaron-gustafson.com/',
24-
'pi_description' => 'Automates swapping of Cloudinary’s image paths for local (server-based) ones.',
24+
'pi_description' => 'Automates swapping your local (and remote) image paths for Cloudinary’s.',
2525
'pi_usage' => Easy_cloudinary::usage()
2626
);
2727

@@ -42,10 +42,7 @@ function __construct()
4242
if ( $this->cloudinary_config !== NULL )
4343
{
4444
# get the host name
45-
$http_host = strToLower( ee()->input->server('HTTP_HOST') );
46-
$ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on';
47-
$protocol = $ssl ? 'https://' : 'http://';
48-
$this->site_domain = "{$protocol}{$http_host}";
45+
$this->site_domain = ee()->config->item('site_url');
4946
$this->return_data = $this->convert( ee()->TMPL->tagdata );
5047
}
5148
else
@@ -193,6 +190,8 @@ function usage()
193190
);
194191
```
195192

193+
Be sure you have set the URL to the root directory of your site in your config file or in CP Home > Administration > General Configuration.
194+
196195
Once you have that in place, you simply wrap the content you want to adjust. All images will be processed through Cloudinary.
197196

198197
{exp:easy_cloudinary}

0 commit comments

Comments
 (0)