Plugin

Archived
Forum
(read-only)

CE Image

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Causing Effect

     

Image Paths and AWS

Support (Resolved)

Michael C.
Michael C.

I’ve got an AWS S3 bucket called (for example) static.example.com. It has source images in folders like /img/content/news/.

When I have CE Image fetching those remote images and caching their “made” versions back on the S3 server, their paths get kinda out of hand:

http://static.example.com/img/made/remote/http_static.example.com/img/content/news/news-image_1.png 

Ideally, I’d like the “made” images to be stored in S3 with a path that basically omits the “remote” stuff:

http://static.example.com/img/made/img/content/news/news-image_1-100x100.png 

After all, while the “made” image may be remote to CE Image, it’s not remote relative to the source image’s location. ;) Is this possible?

FYI, I already have this in my config.php:

$config['ce_image_cache_dir''/img/made/';
$config['ce_image_remote_dir''/remote/'
Causing Effect - Aaron Waldon
# 1
Developer
Causing Effect - Aaron Waldon

Hi Michael!

The long URLs are to prevent naming conflicts, and possibly overwriting images. However, you can use hide_relative_path=“yes” and the cache_dir= param to have more control over your S3 URLs.

Does that make sense?

Michael C.
# 2
Michael C.

Yeah, that does make sense, thanks. One more thing… I do have “$config[‘ce_image_bucket’] = ‘static.example.com’;” set in my config.php, but unless I specify the bucket=“___” parameter in the {exp:ce_image:*} tag, the “made” files aren’t getting saved to S3. Any idea what that’s about? I’d like it to save the “made” files to S3 by default…

EDIT: Is the config variable supposed to be “ce_image_aws_bucket” instead of “ce_image_bucket”? I see all the other AWS-related vars are “ce_image_aws_*”...

Causing Effect - Aaron Waldon
# 3
Developer
Causing Effect - Aaron Waldon

The corresponding config variable for the bucket= parameter is ‘ce_image_bucket’.

Are you running the latest version of CE Image?