Soundcloud 500x500 artwork by default

Black Dahlia picture Black Dahlia · May 14, 2013 · Viewed 20.5k times · Source
  if($song->artwork_url != null) {
      $song_artwork = $song->artwork_url;
  }
  else {
      $song_artwork = 'img/no_art.png';
  }

By default soundcloud pulls -large (which is 100x100)

How do i make it pull (t500x500) so i can have a higher res image?

Answer

likeitlikeit picture likeitlikeit · May 14, 2013

Just replace large.jpg by t500x500.jpg in the filename, like so:

  $song_artwork = str_replace('large.jpg', 't500x500.jpg', $song->artwork_url);

In fact, they support a number of different formats for different requests:

t500x500:     500px×500px
crop:         400px×400px
t300x300:     300px×300px
large:        100px×100px  (default)
t67x67:       67px×67px    (only on artworks)
badge:        47px×47px
small:        32px×32px
tiny:         20px×20px    (on artworks)
tiny:         18px×18px    (on avatars)
mini:         16px×16px
original:     originally uploaded image

I found the documentation in the Soundcloud API reference, search for artwork_url.