Quantcast
Channel: Pixabay Forum - Questions about Pixabay
Viewing all articles
Browse latest Browse all 1344

API downloading multiple image sizes (snowboard7200)

$
0
0
I need to use multiple sizes of each image that my users access via the Pixabay API. Is it okay to download 4 sizes of a single image using the URLs returned by the API and save them on my server? Option 1:Download the image in multiple sizes from the URLs returned by the API. previewURL, webformatURL, largeImageURL, and fullHDURL. Option 2:Alternatively, I could download only the fullHDURL then copy and resize the images on my server. Is either option allowed or is there a preferred method by Pixabay? A little background on my use case: I'm building a web app that allows my users to access background images from the Pixabay API for design use in my web app. My web app can be resized in the browser. If a user searches for an image when their browser window is small I would server them the image from the webformatURL to save on bandwidth and make the image load faster. However, it is possible that the user could then maximize their browser window and the smaller image would become pixilated. In this case I would switch it out for either the image from the largeImageURL or fullHDURL depending on their viewport size. To accomplish this I need to save the image in multiple sizes to avoid a repeat call to the Pixabay API. Thanks,Marcus

Viewing all articles
Browse latest Browse all 1344