Custom ImageOptions
for each url (URL-level options)
#19
Closed
fityannugroho
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
I think arrays are much faster, so I'm suggesting: const images = [
{ url: 'https://placehold.co/600x400', name: 'myimage'},
{ url: 'https://placehold.co/100x200', name: 'fav'}
]
const loads = await imgdl(images) |
Beta Was this translation helpful? Give feedback.
2 replies
-
Has been resolved by PR #20 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea is to provide
ImageOptions
settings for each url. User can pass an object intoimgdl
function that as the first argument. That object must contains the image url as the key, and theImageOptions
as the values. For example:This URL-level options will overrides any
ImageOptions
values in the second argument ofimgdl
(function-level options). For example:UPDATE:
Considering the possibility of use cases where users download images from the same url and want to save it with different attributes (names, extensions, or directory locations), we decide to use array of objects rather than objects. For example:
Beta Was this translation helpful? Give feedback.
All reactions