Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

imgbb upload image in an album via api

I have a trouble with using imgbb API via imgbb API i've been trying to upload an image to the album that i created on imgbb. but i couldn't find any of informations so far... (i've been googling for 3hours lol) anyone knows what to add for saving images in an album?

here are my codes.

thanks for reading :)

let body = new FormData()
body.set('key', 'my-api-key')
body.append('image', File)


axios.post('https://api.imgbb.com/1/upload/', body)
    .then((response) => {
        console.log('response', response)
        console.log('response URL', response.data.data.image.url)
        console.log('success')
    })
    .catch((error) => {
        console.log('error', error)
        alert('try agian')
    })  enter code here
like image 672
heyjay Avatar asked Oct 25 '25 15:10

heyjay


1 Answers

I have had the same problem and I did some research. Turns out the API does not natively support uploading to an album. If you need to organize your images into albums on ImgBB, you would typically need to manually organize them on the ImgBB website or through their interface. The ImgBB API primarily focuses on providing endpoints for uploading images, retrieving image details. However, a workaround is to categorize images in the image description or metadata when uploading them and later filter or group them based on those categories within your application.

like image 72
nelsonsule Avatar answered Oct 27 '25 03:10

nelsonsule