500px

 

Initial Setup (#)

Photos from 500px can be included into your posts using Photonic. To display the photos you have to request a Consumer API Key. Once you have your API key and secret, set them in the options under Settings → Photonic → 500px → 500px settings.

The API key is not necessarily approved immediately. Until it is approved you cannot use it to retrieve photos. You can check the status of your API key by looking at your registered application details in the 500px admin screens. For “Approved” it should show “Approved. You’re good to go”.

500px was at one time the most fickle with their API amongst all the providers that Photonic supports. I have had them change the format of their URLs, completely trash existing APIs etc., without ever notifying the developers of such changes. Since mid 2015 things have been a lot better, though. If you do happen to find something broken, please notify me immediately, and I will work to fix the issue ASAP.

Basic Syntax (#)

The following is the basic syntax:

[gallery type='500px' feature='xyz']

The parameter values for feature are described on the API documentation page:

  • popular – Returns “popular” photos
  • upcoming – Returns “upcoming” photos
  • editors – Returns “Editor’s choice” photos
  • fresh_today – Returns photos that are “Fresh Today”
  • fresh_yesterday – Returns photos that were “Fresh Yesterday”
  • fresh_week – Returns photos that are “Fresh this week”
  • user – Returns photos for a specified user. Needs either the user_id or the username attribute specified.
  • user_friends – Returns photos by users whom the specified user is following. Needs either the user_id or the username attribute specified.
  • user_favorites – Returns photos that are the specified user’s favourites. Needs either the user_id or the username attribute specified.

Getting Photos for a User (#)

To get photos from a particular user, use the feature switch feature='user'. The following are photos by Colin Spencer:

  • Early morning drinks
  • Stuck in the planer
  • Ribble Valley viaduct
  • Basilica di Santa Maria della Salute
  • Venice Grand Canal panorama
  • Domed church
  • Moon disappearing behind the mountains
  • Emma- Jayne portrait
  • Sunset panorama - Spain
  • Chrome Scull
  • Villena Castle B&W
  • Villena Castle
  • Bee and Almond blossom
  • Almond blossom
  • Teruel Tower
  • Enjoying the sunshine
  • The Crystal Palace
  • Sunset over the mountains 2
  • Sunset over the mountains
  • Wedding by the sea

The above uses this format:

[gallery type='500px' feature='user' username='abc' rpp=20]

The rpp parameter can control how many photos you want to display in the gallery. The maximum is 100 and the default is 20. If you use a number higher than 100 the default of 20 photos are returned.

Generic Photos from 500px (#)

You can get photos not specific to a user by using any of the feature switches from the above that don’t have user in them. This can help you find photos that are popular, editors’ choices, upcoming etc. The following gets popular photos from only a specific category:

  • quiet
  • morning dance
  • Memory of autumn
  • Snowflakes
  • Bird
  • Beautiful Duck
  • Blue Rocket
  • Cyanistes caeruleus portrait
  • Brimstone Butterfly on Grey Background
  • Alakarga - Eurasian Jay - Garrulus glandarius
  • Goldfinch - Cardellino
  • chardonneret elegant
  • Tymo
  • Ah, There You Are!
  • willi
  • 쇠부엉이
  • *
  • 황조롱이
  • Jump
  • Black Face ! Pink Flamingo, Camargue
  • American robin - Merle d 'amérique
  • Lioness 039
  • Cormoran
  • More Nesting Material
  • Stand still ..... perfect
  • Suricate ( meerkat )
  • Short-eared Owl
  • Swan and ducks in the twilight
  • Bird
  • Well-kept territory ..
  • Yawning rattlesnake
  • Sync
  • the way is clear
  • SUPER KINGFISHER
  • Puppy time means sweet moments <3
  • Burrowing Owl
  • Remullada / Soaking
  • Cat
  • About to land
  • Snow Dog
  • Hamerkop
  • Red Kite In Front Of Me
  • Hunter
  • Bird
  • Untitled
  • THE SHUFFLE
  • Mountain hare looking
  • "in the beautiful sunshine..."
  • waterbuck
  • Serçe
  • CL • 2016.306 • Behind the Boss
  • Burrowing Owl
  • Red tailed Hawk
  • Seagull
  • Blending in...
  • Redshank
  • Reaching high
  • Untitled
  • Meerkats
  • great tit
  • Just sitting here
  • Anna's Hummingbird
  • Camouflage
  • The Thinker !!!!!!!!!!
  • african sacred ibis..
  • - wintertime -
  • No Respect For The Elderly !!
  • My new best friend ;-)
  • Finch
  • Eurasian Tree Sparrow
  • Mavi baştankara - Eurasian Blue Tit - Cyanistes caeruleus
  • I don't usually do many animal shots, but this was ...
  • scared..!
  • Nuthatch Perched Fence
  • Zebra posing
  • The Eyes
  • Curiosity
  • Untitled
  • Flowers and bees
  • swan
  • The walk
  • Crabier chevelu
  • Breakfast search
  • Squirel
  • I love to fly!
  • Mover Over Guys
  • Redshank in the fog
  • Grande Aigrette - Great Egret
  • Sun Conure
  • The Light of Dawn
  • Over the grass
  • 560. Solar bird
  • Protected
  • Cynorhodon
  • cheetah is catching...
  • animal
  • jonny walker
  • Plain tiger
  • Target acquired...
  • Ousted bull Hippo

The above uses the shortcode:

[gallery type='500px' feature='popular' only='Animals']

Additionally you can alter the sizes to be returned using the thumb_size and the main_size parameters. The complete list of image sizes can be found in the 500px documentation.

The following demonstrates a size 2 (140 × 140 px) thumbnail with a size 3 (280 × 280 px) popup, with 9 Editors’ Choice Black and White photos:

  • My photo recap of the #combipoolclassic is up on our @_chickflip_ blog. Congrats again to...
  • The modern Venus
  • Colour Wheel
  • Sunken Boat
  • Stride
  • 0124
  • ****
  • ***
  • ***

The above uses the shortcode:

[gallery type='500px' feature='editors' only='Black and White' rpp=9 thumb_size='2' main_size='3']

Tags and Searches (#)

What if you wanted to search for specific photos in 500px.com? For this you may drop the feature parameter. You could use the tag parameter to get photos with a specific tag. Note that the tag parameter doesn’t work with other parameters such as feature or sort. This is a limitation of the 500px.com API. The following 12 photos are tagged “Iceland” and are being displayed with size 2 (140 × 140 px) thumbnails:

  • The road to Lakagigar
  • The Ice Face
  • The ice wave
  • Reflections
  • Seljalandsfoss in Spring
  • Dyrholaos
  • Midnight sunset close to Akureyri, Iceland
  • Morning Shower in Iceland
  • House in Iceland
  • Seljalandsfoss
  • Seljalandsfoss - Rainbow - Islande
  • Calmness

The above uses the shortcode:

[gallery type='500px' tag='Iceland' rpp=12 thumb_size='2']

You could also search for photos with a specific search term using the term parameter. Like tag, this too doesn’t work with other parameters such as feature or sort. The following photos are the results of searching for “Hyderabad”:

  • Charminar - Jewel of Hyderabad, India.
  • Sculpting
  • Working Hands
  • Ruins
  • The Natures Jewel
  • In riding a horse we borrow freedom
  • Purple swamphen
  • Here I come
  • Follow Me!!
  • Forever rose
  • Spot-billed Duck @ Hebbal lake
  • Bend
  • 1
  • Becoming One With Nature
  • kid
  • The King
  • Leave me Alone World
  • Butterfly
  • Lambadi woman
  • Golkonda
  • Taj Falaknuma Palace - main
  • Qutub Shahi Tombs
  • sunrise
  • Happens Only in India
  • Charminar
  • Gold Rush
  • Glorious
  • Purple heron in flight
  • Dome
  • Haystacks on a foggy morning.
  • Dream
  • Flowers
  • Moroccan Lamps
  • Butterfly
  • cover
  • Just the 3 of us
  • Garden Flower Close-up
  • Pots
  • Sunset in Hyderabad
  • Sculpting..
  • Heavens Walls
  • SHOUTING CROW
  • En-Route
  • Shallow Perspective
  • Off to Work
  • Lord Ganesha
  • FEEL GOOD
  • Feeling Fresh
  • Bulbul
  • Solitude
  • Birla Temple, Hyderabad
  • The Tombs
  • The Golden Hour!
  • Hyderabad view from Taj Falaknuma Palace
  • Wings Of Freedom
  • Getaway
  • The Phoenix
  • Sun Rise 1
  • Peacock
  • Snake
  • Face of the City.
  • Charminar, Hyderabad, India.
  • Swimming Pool View
  • Petite Aurora Borealis.
  • War Ready
  • Indian fox bat
  • Live The Moment
  • This Way Up
  • White-browed Bulbul
  • Tiger Butterfly
  • Chowmohalla Palace
  • Khilwat Clock
  • Floating Douhnut
  • Azure Damselfly
  • Silent tiger with Cruel looks
  • luv books
  • Happy & Safe "Diwali"
  • water lilly
  • Tyke
  • Happiness is not a destination. it is a method of life.
  • Natures Colors
  • Ashy Prinia
  • Life = Webbed
  • Good Morning
  • Tiger Butterfly
  • Orange Rose
  • Scaly Breasted Munia
  • Morning Jewel
  • Chomahalla Palace
  • Surreal
  • INDIAN TRIBALS.jpg
  • Beautifully Creepy
  • FILTH
  • Silver Lining
  • love everywhere
  • Gautama Buddha Statue of Hyderabad, India
  • Squirrel
  • The bazaar ...
  • Turtle at Zoo
  • Paint me Red!

The above uses the shortcode:

[gallery type='500px' term='Hyderabad']

Single Photos (#)

Photonic also lets you display a single photo from 500px.com:

Enjoying the sunshine

Enjoying the sunshine
A pretty girl sunning her self in a park in Madrid.

The above is a photo by Colin, and such single photos can be displayed using the shortcode:

[gallery type='500px' view='photos' view_id='abc']

Galleries / Collections / Sets (#)

Galleries (formerly Collections, Sets) are supported in 500px.com, both via using their names and their ids. This needs authentication, and can be invoked thus:

[gallery type='500px' view='collections' view_id='abc']

In the above, ‘abc’ is the collection id. To get the id, open the link of any photo in a collection. The URL will have the structure http://500px.com/photo/7206122?from=set/265673. Pick the portion after from=set/, which in this case is 265673. This way to fetch the collection id is convoluted, yet required if you are not passing user information. The following is Colin’s Portfolio:

My Portfolio

  • Sunset over the mountains
  • Sunset over the mountains 2
  • The Crystal Palace
  • Enjoying the sunshine
  • Teruel Tower

… Got by using this:

[gallery type='500px' view='collections' view_id='19669029']

Life is a lot easier if you do pass the user information, in which case you can use named galleries (showing Colin’s portfolio below):

  • Teruel Tower
  • Enjoying the sunshine
  • The Crystal Palace
  • Sunset over the mountains 2
  • Sunset over the mountains

To get the above, we use the easily-readable username:

[gallery type='500px' view='collections' username='abc' view_id='portfolio' layout='circle' thumb_size='2']

If you drop the view_id parameter, Photonic can fetch all collections for a user, provided the user is given. Both, user_id and username are accepted.

The above uses the shortcode:

[gallery type='500px' view='collections' username='sayontan' layout='random']

Filters (#)

What if you had multiple galleries and only wanted to show some of them? You can use the filter attribute for this purpose. You can pass a comma-separated list of gallery names for the filter, saying filter='abc,xyz':

… Got by:

[gallery type='500px' view='collections' username='sayontan' layout='random' filter='Bushveld']

Lastly you can use the columns parameter to display a certain number of photos per row, just like regular galleries.

“Show More” and Paged Results (#)

If a search result has a lot of photos and you want to reduce the count, Photonic offers a couple of approaches:

  1. For 500px, use the rpp attribute documented above, and add an additional tag, more. This will initially show you the number of photos specified in rpp, and a button to load more images. Upon clicking the button you will see an additional set of photos as limited by rpp. The button will continue to show until you have exhausted the entire set of photos.
  2. Photonic can be used in conjunction with <!-- nextpage --> to display photos in a paged manner. For this you can structure your page content thus in the WP Editor:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porta enim vel tellus dignissim, a venenatis neque congue. Nunc ornare cursus leo ac viverra. Pellentesque suscipit pulvinar metus, non aliquam odio egestas quis. Vestibulum porta viverra magna, vel malesuada ante fermentum vitae.
    [gallery type='500px' feature='user' username='valkrider' rpp=20 page=1]
    <!-- nextpage -->
    [gallery type='500px' feature='user' username='valkrider' rpp=20 page=2]
    <!-- nextpage -->
    [gallery type='500px' feature='user' username='valkrider' rpp=20 page=3]
    

Here is an example using the first approach. The text you provide to the more parameter controls what is shown in the button:

[gallery type='500px' feature='user' username='valkrider' rpp=20 page=1 layout='circle' more='More']