Photo Links as /photo/
ScottInAustin
Registered Users Posts: 12 Big grins
I am using API 1.3.0 in a PHP program to embed photo urls in a blog. The API images.getURLs function, returns the photo URLs such as: http://example.smugmug.com/Motorhome-Galleries/Travels-2004/My-Tradewinds-Cabo/i-J38Rhn7/0/Th/65064762_1-Th.jpg.
I dislike the URL containing the folder structure in case I move the photos.
The API docs for images.getURLs show the URL examples with just the folder structure as /photos/. Example: http://example.smugmug.com/photos/i-J38Rhn7/0/Th/65064762_1-Th.jpg.
I discovered this works! I can replace the folder structure with a simple /photos/ for a much simpler URL.
Is there a way to force the API to return a URL with /photos/?
Thanks
I dislike the URL containing the folder structure in case I move the photos.
The API docs for images.getURLs show the URL examples with just the folder structure as /photos/. Example: http://example.smugmug.com/photos/i-J38Rhn7/0/Th/65064762_1-Th.jpg.
I discovered this works! I can replace the folder structure with a simple /photos/ for a much simpler URL.
Is there a way to force the API to return a URL with /photos/?
Thanks
0
Comments
http://gallery.iltsbd.com/Motorhome-picks/i-J38Rhn7/0/Th/65064762_1-Th.jpg
And you can see that the "old" link continues to work, even though your photo has now moved.
I think /photos/ URLs are returned when the image is sourced from an Unlisted gallery (since including the gallery name in the URL would reveal the existence of the Unlisted gallery). You can probably just transform your URLs to /photo/ URLs with a regex like this:
Please check out my gallery of customisations for the New SmugMug, more to come!
This is the last step in converting an old blog to blogger, an old gallery to Smugmug. I had to maintain the directory (folder) structure and refererences to photos from the blog.
This step parses the photo references from the old blog, matches the old reference to the new smugmug id/keyword and reconstructs the html for the new blog.
Now I have shorter, consistent photo URL's which are MUCH easier to proof!! And less confusing when we moving things around.
Thank you!!!
..../photos/XXXXXXX_xxxxxx-M.jpg
In newSmug the /XXXXXXX_xxxxxx can be found in the page source in the feed url's.
At least for the old gallery links.
<link rel="alternate" type="application/rss+xml"......&Data=38993374_NWjRjH&format=rss200" />
<link rel="alternate" type="application/atom+xml" ......&Data=38993374_NWjRjH&format=atom10" />
My Website index | My Blog