tylerhall / autosmush Goto Github PK
View Code? Open in Web Editor NEWLosslessly compresses images in your Amazon S3 buckets on-the-fly.
Losslessly compresses images in your Amazon S3 buckets on-the-fly.
Hi Tyler,
Thanks for this awesome tool! I really appreciate your hard work. My question is, will you be updating this to work with the new SDK? If not, it would be good to be sure to link from your Readme the page to download the 1.6.x version of the SDK, as it took me a bit to figure out I was using the wrong version of the SDK. (It can be found here:http://aws.amazon.com/releasenotes/PHP/4051273386766049)
Anyway, thanks for this great tool!
I'm getting a syntax error when I try to run this script:
Parse error: syntax error, unexpected ',', expecting '(' in /path/to/autosmush on line 120
Any idea why? I'm running PHP 5.2.5 (cli)
I am gettin this error when i run the code as :
[root@* smush]# php autosmush s3-bucket name
KIPPED: 0204c4b4-3727-4fa6-ac62-40ff57201b06.jpg already smushed
NOT SMUSHED: 0204fe99-b90c-468a-b1ff-79746502c482.jpg already compressed
PHP Fatal error: Couldn't find implementation for method CFArray::getiterator in Unknown on line 0
What is problem. I use PHP 5.3.28 as version
First of all, i'd like to thank you for writing this awesome tool. Looks very useful for my project.
However, when i try to run the script, i get an error saying that the smushed version of the file could not be downloaded. When i checked, i saw that the files created in the /tmp folder have different names from what is expected by the script. They seem to have 6 characters appended to them.. 'smushxyzxyz'. Any idea why this is happening and how to fix this.
FYI.. my server runs rails. So i just installed PHP5, php-curl, the aws sdk and restarted apache. Is there anything else that i should've done here?
root@kettik:/autosmush# ./autosmush kettik_development/autosmush# ls /tmp
SMUSHED: articles/1/coverimgs/c43290a2662ff8fe9fcfe8c352a007bb_cover.jpg (42.50%)
ERROR: Could not download smushed version of articles/1/coverimgs/c43290a2662ff8fe9fcfe8c352a007bb_cover.jpg
SMUSHED: articles/1/coverimgs/c43290a2662ff8fe9fcfe8c352a007bb_original.jpg (41.76%)
ERROR: Could not download smushed version of articles/1/coverimgs/c43290a2662ff8fe9fcfe8c352a007bb_original.jpg
SMUSHED: articles/1/coverimgs/c43290a2662ff8fe9fcfe8c352a007bb_small.jpg (66.75%)
^C
root@kettik:
passenger.1.0.9956 smushOuXAXx smushPjBKz6 smushqgoJD5
Smushit library seems to use Yahoo servers. It seems like http://www.smushit.com is down and no longer available.
is this still working? am I missing something?
Hi,
I am getting following error when I am trying to autosmush my s3 bucket,
Error: Unable to retrieve bucket contents.
What can be the reason for this error? Are some configurations in s3 console required to get autosmush to work?
Hi,
Just wanting to know if this project is active and proven to still work even though the last commit was years ago?
The script works great for me now. But one issue i found was that the temp files created in the /tmp folder are not deleted. So i added the 'unlink($tmp_filename);' command after the s3 object was updated to delete the temporary file.
The change is working fine for me. I suggest you update the 'official' script as well.
The file's instructions say to unzip AWS SDK for php and copy the sdk-x.x.x folder and rename to sdk in lib for autosmush but there's no sdk-x.x.x folder when i unzip SDK 1.6.2 ?
-rw-r--r-- 1 root root 124 Mar 15 2013 .gitignore
-rw-r--r-- 1 root root 9.5K Mar 15 2013 README.md
drwxr-xr-x 2 root root 4.0K Mar 15 2013 _compatibility_test
drwxr-xr-x 2 root root 4.0K Mar 15 2013 _docs
drwxr-xr-x 5 root root 4.0K Mar 15 2013 _samples
drwxr-xr-x 2 root root 4.0K Mar 15 2013 authentication
-rw-r--r-- 1 root root 762 Mar 15 2013 composer.json
-rwxr-xr-x 1 root root 3.4K Mar 15 2013 config-sample.inc.php
drwxr-xr-x 2 root root 4.0K Mar 15 2013 extensions
drwxr-xr-x 6 root root 4.0K Mar 15 2013 lib
-rwxr-xr-x 1 root root 49K Mar 15 2013 sdk.class.php
drwxr-xr-x 2 root root 4.0K Mar 15 2013 services
drwxr-xr-x 2 root root 4.0K Mar 15 2013 utilities
As of today, the smush.it api endpoint expects all spaces in file name to be URL encoded pluses (%2B).
e.g.:
Image Name = image with spaces.png
This returns null:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%20with%20spaces.png
This returns the expected response:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%2Bwith%2Bspaces.png
I am running the script locally and connecting to my S3 account by following the directions, it seems to have passed header files to all the files, but when I go to smushit and upload the same files they aren't compressed, just the header part is changed. Wondering how I can remove the header file and smush or force smush, any idea?
Hi,
I have an
Error: Unable to retrieve bucket contents. on ./autosmush subdomain.domain.com
The name of bucket is a subdomain because i have enabled website hosting for get images by subdomain.domain.com
Thanks
I am getting following error on trying to run
./autosmush my.bucket
Error:
bash: ./autosmush: Permission denied
What can be the reason of this error? I have entered AWS S3 access key and secret key in autosmush
file.
Thank you for this. I have one question, is the Smushit integration official or just a hack? Seems hacked from the ajax interface, i don't care. I just wish Yahoo would make it official so this doesn't break out of the blue.
I'm getting this issue when trying to run the command:
Fatal error: Call to undefined function: date_default_timezone_set() in /nfs/c04/h01/mnt/59856/users/.home/autosmush/autosmush on line 16
I'm running PHP 5.3.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.