I thought I would do a runnable version based on Mr Alien's (now deleted) answer. However, as pointed out by Vektor's comment this is likely not helpful (or at least not ideal) if you're working in something like React.
If you are working in something like React you would more likely want to setup state for the images array, render the images based on this array and setup something like a useEffect hook / componentDidMount method to load the images and update the state.
Runnable version based on Mr Alien's (now deleted) answer:
const ele_with_attributes = (tag, attributes = {}) =>
Object.assign(document.createElement(tag), attributes);
const append_image_from_api = (item) =>
document.getElementById('images').appendChild(
ele_with_attributes('img', {
src: item.thumbnailUrl, //item.url,
alt: item.title
})
);
axios
.get('https://jsonplaceholder.typicode.com/photos', {params: {_limit: 5}})
.then(res => res?.data?.forEach(append_image_from_api));
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.21.1/axios.min.js"></script>
<div id="images"></div>