What about those new image URLs
jfriend
Registered Users Posts: 8,097 Major grins
Have the results from smugmug.images.get changed at all due to the new form of image URLs that were just introduced? Are they going to change?
They use to look like this:
http://jfriend.smugmug.com/Kenya/Highlights/Animals/JLF5194/344289826_fYUVP-X2-1.jpg
and now they look like this for new images:
http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/KevinF/i-xbQPMBK/0/L/rowing-20110415145150_7511-L.jpg
Filename is different.
ImageID is different.
Version is in a different place.
Size is in a different place.
If I request a list of images in a gallery with images.get, what kind of image URLs am I going to get in the results? If it's a new image, will I still get an imageID and imageKey in the results. Will there be a new field "newImageID" that works in the new image ID in the new image URL?
I'm currently using API version 1.2.2 and switching to 1.3.0 soon.
I ask all this because I'm using smugmug.images.get to get a list of images in a gallery and I then construct my own image URLs with a custom size in them. Right now, I'm using the imageID and imageKey from the results and parsing the version out of the ThumbURL and then construction my own URL using /photos/imageID_imageKey-nnnnxmmm-1.jpg. Obviously my parsing of the version will break on new URLs since it's in a different place now. I'm trying to figure out if anything else will break and if there are any updates to the results to reflect this image URL change?
They use to look like this:
http://jfriend.smugmug.com/Kenya/Highlights/Animals/JLF5194/344289826_fYUVP-X2-1.jpg
and now they look like this for new images:
http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/KevinF/i-xbQPMBK/0/L/rowing-20110415145150_7511-L.jpg
Filename is different.
ImageID is different.
Version is in a different place.
Size is in a different place.
If I request a list of images in a gallery with images.get, what kind of image URLs am I going to get in the results? If it's a new image, will I still get an imageID and imageKey in the results. Will there be a new field "newImageID" that works in the new image ID in the new image URL?
I'm currently using API version 1.2.2 and switching to 1.3.0 soon.
I ask all this because I'm using smugmug.images.get to get a list of images in a gallery and I then construct my own image URLs with a custom size in them. Right now, I'm using the imageID and imageKey from the results and parsing the version out of the ThumbURL and then construction my own URL using /photos/imageID_imageKey-nnnnxmmm-1.jpg. Obviously my parsing of the version will break on new URLs since it's in a different place now. I'm trying to figure out if anything else will break and if there are any updates to the results to reflect this image URL change?
--John
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
0
Comments
Can someone at SM explain how the new image URLs are or aren't present in the API responses and what are the future plans for that. Will the new-fangled imageID that shows up in gallery pages be present in a future version of the API?
Will the API always return old style image URLS with imageID and imageKey and the version number in the old location? Or is it now going to return new image URLs for new images?
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
To make your life (and other developers) easier, I've just added a CustomSize argument (eg. &CustomSize=200x200) to any methods (1.2.2 and 1.3.0) that returns image urls which will result in a CustomURL parameter in the response.
That should eliminate the need for any client side parsing.
I'll let you know when it's live.
Cheers,
David
SmugMug API Developer
My Photos
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
eg: &CustomSize=400x400
str = str.replace(/400x400/g, customWidth + "x" + customHeight);
SmugMug API Developer
My Photos
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
SmugMug API Developer
My Photos