Image-core v1.0.2
In this new version we have only fixed
a couple of bugs
and we have also added 12 new images
to the api so at the moment there are only 36 images available
and soon we will add more than +20 images
.
// downloadImageExample.js
// Import the function downloadRandomImage from index.mjs file
import { downloadRandomImage } from 'imagen-core';
// Calling the downloadRandomImage function to download an image
async function exampleDownloadRandomImage() {
try {
await downloadRandomImage();
console.log('Image downloaded successfully.');
} catch (error) {
console.error('Error downloading the image:', error);
}
}
// Execute the example
exampleDownloadRandomImage();