How would I display array of various unsplash images?

I’d like to display various images from unsplash, set each as a cover image for a different div card. what should I do to achieve that?

I’d suggest changing each string to an object so you have a nested array of objects with each object containing the text and image URL. You pass an object to the itemcard function item parameter. The images will be using the img element in the template, and not be background images. You need to change url to the correct attribute for an img element.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.