Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Smush.it service is no longer available at smush.it.
It has been moved to http://imgopt.com/
And it seems like the API has changed too - e.g. it takes an 'img' parameter now.
The module throws errors on save now as it cannot find the service.
Comments
Comment #1
pixelsweatshop CreditAttribution: pixelsweatshop commentedYup, this makes this module unusable (well for smush.it imgopt anyways). Updating status to reflect that.
Comment #2
charlyie CreditAttribution: charlyie commentedWe launched this tool (resmush.it) to replace the Yahoo's implementation. It has exactly the same features and works great with ImageAPI Optimize :)
Comment #3
Plits CreditAttribution: Plits commentedAttached a patch for using the resmush.it service with ImageAPI Optimize.
Hope it helps :)
Comment #4
rj CreditAttribution: rj commentedWorks for me. Attached is a patch with an update hook to change the imagecache_optimize_service variable to 'resmushit' if it is currently set to smushit.
Comment #5
anthonylindsay CreditAttribution: anthonylindsay commentedFantastic! I'll try resmushit later on today and report back.
Comment #6
anthonylindsay CreditAttribution: anthonylindsay commentedWhilst the patch in #3 applied cleanly, I can't get it to work. As far as I can see the CURL request to the resmushit service fails because Drupal throws this error:
A couple of DPM calls reveals that the error is thrown because there is no JSON object because no $data is returned from the CURL call.
Does anyone else get similar results? Or am I doing something odd?
Comment #7
PhoenixAvenger CreditAttribution: PhoenixAvenger commentedThe patch in #3 worked for me.
Comment #8
khayong CreditAttribution: khayong commentedNote that the resmush url should be 'http://www.resmush.it/ws.php' instead of 'http://www.resmushit.com/ws.php'. The wrong url cause no JSON object returned.
Comment #9
handrus CreditAttribution: handrus as a volunteer and at Taller commentedJust re-roling patch number #4 with the correct URL
Comment #10
Plits CreditAttribution: Plits commentedOh my bad, thanks handrus, i pushed the wrong patch here !
Comment #11
jsdix CreditAttribution: jsdix as a volunteer commentedMy from #9 works, but with PHP 5.5 fails with changes in PHP 5.5 (see https://www.drupal.org/node/2333345). I've adjusted #9 to account for those changes.
See below #12
Comment #12
jsdix CreditAttribution: jsdix as a volunteer commentedComment #13
krueschi CreditAttribution: krueschi as a volunteer commentedThe patch from #12 works like a charm for me.
Thanks!
-- php 5.6.10 --
Should we update the issue to "Needs review"?
Comment #14
charlyie CreditAttribution: charlyie commentedWorks for me too. Yes, it should be updated to "Needs review" :)
Comment #15
krueschi CreditAttribution: krueschi as a volunteer commentedComment #16
handrus CreditAttribution: handrus as a volunteer and at Taller commentedI've made various tests with all image formats supported.
I'm going to have patch #12 applied on a production website.
Comment #17
jcisio CreditAttribution: jcisio at Axess Open Web Services for ARTE G.E.I.E. commentedIt basically work. But we need some fixes to meet the coding standard.
Why do we need this?
There will be ton of messages for the wrong target (end user). hook_requirements would be better.
Comment #18
joelpittetThat
function_exists
message isn't necessary at all because this is for D7 and that function was available in > 5.2.0@see https://www.drupal.org/requirements/
@see https://secure.php.net/json_decode
Comment #19
jcisio CreditAttribution: jcisio at Axess Open Web Services for ARTE G.E.I.E. commentedIt is compiled into PHP by default but could be turned off. Moreover, distros like Debian remove it from the bundle (because of license issue) and require to install php5-json package.
Comment #20
joelpittetKidding me right? I have 50 uses in the contrib modules I'm using. This is the only module that does an exist check on it. (over 350 contrib modules).
Drupal core even uses it as it's wrapped
drupal_json_decode()
function.Should we have to bloat our modules just for all the edge cases?
Sorry for coming off angry but there has got to be some reasonable expectations on your servers?
Comment #21
anthonylindsay CreditAttribution: anthonylindsay commentedPatch at #12 works.
Comment #22
funana CreditAttribution: funana commented#12 works perfectly. Thank you!
Comment #23
pixelsweatshop CreditAttribution: pixelsweatshop commented#12 Works. Is it possible to roll a new release now, jcisio?
Comment #24
BigBrother2010 CreditAttribution: BigBrother2010 commentedI managed to apply #12 and have no errors now.
Might be stupid question but how can i be sure its working ? I am looking for files in all directories and can only find original images i uploaded, no idea where are optimized stored.
I read on smush.it that it wont handle files larger then 2mb, so what happens in this case ? Does the module swtich to something else (internal) to process the image ?
Comment #25
ptmkenny CreditAttribution: ptmkenny commentedNew patch that makes the changes requested by the maintainer in #17 and also removes the smush.it service file because it no longer works, so there's no point in having it as an option.
Comment #26
alexloganlee CreditAttribution: alexloganlee commentedIs everyone here using 7.x-1.x-dev together with ImageMagick 7.x-1.x-dev? I can't seem to get it to work. My image styles are appearing as broken images.
Comment #27
rbomhof CreditAttribution: rbomhof commentedI was able to apply #25 and can confirm it works after I update my database, though when I inspected the json response after uploading my images i see percent = 0, which means I'm not getting any savings. I'm using it with ImageMagick 7.x-1.0. Curious if anyone else is having the same problem.
edit: should have added that i do see a savings when using GD, though it is only at 2%.
Comment #28
rootworkYep -- #25 works!
Comment #30
jcisio CreditAttribution: jcisio at Axess Open Web Services commentedThanks. Committed and pushed #25.
Comment #32
sic CreditAttribution: sic commentedThe url has changed to api.resmush.it
Comment #33
giupenni CreditAttribution: giupenni commentedAs sic said, the url has changed to api.resmushit.it
http://resmush.it/api#compression
Comment #34
rootworkCommenting on a closed issue isn't likely to be seen.
If it's directly related to the original issue (i.e. if the patch caused a regression or other error) you should re-open the issue by marking it as active when you make your comment.
In this case, although it's obviously related, this is a new issue (reSmush.it changed its address after this patch went in) and so I've opened a new issue:
#2717517: Update reSmush.it endpoint
Should be a pretty easy patch if anyone wants to take it.