Using scripts with Amazon Cloudfront
Posted: 2016-03-04T08:02:35-07:00
I'm testing out Fred's cyclinderize script and it works fine on my server.
Now the problem is on my website: The majority of my images are dynamically created/sized (with php imagick) and are delivered on Amazon Cloudfront. See this link for full info:
http://www.sitepoint.com/dynamic-image- ... udfront-2/
So my images instead of being called like:
They are instead like so:
So my setup is the below in my cylinder.php script:
And in an HTML file i have:
All ok. Now if i try and use Cloudfront it doesn't work:
I'm guessing it's because the bash script isn't installed on Amazon? Is there a way to do so?
Now the problem is on my website: The majority of my images are dynamically created/sized (with php imagick) and are delivered on Amazon Cloudfront. See this link for full info:
http://www.sitepoint.com/dynamic-image- ... udfront-2/
So my images instead of being called like:
Code: Select all
<img src="http://www.mywebsite.com/minD_80/imagestore/Penguins.jpg" alt="" />
Code: Select all
<img src="//abcdefg1234.cloudfront.net/minD_80/imagestore/Penguins.jpg" alt="" />
So my setup is the below in my cylinder.php script:
Code: Select all
$docRoot = getenv("DOCUMENT_ROOT");
header("Content-type: image/jpeg");
passthru("bash ".$docRoot."/path-to/cylinderize.sh -m vertical -r 132 -l 270 -w 100 -p 13 -d down -e 1.4 -a 95 -v background -b none -f none -o +0+8 -n 93 front.jpg back.png JPG:-");
Code: Select all
<img src="cylinder.php" />
Code: Select all
<img src="//abcdefg1234.cloudfront.net/cylinder.php" />