score:0

Accepted answer
const classpic = ["https://cdn.pixabay.com/photo/2014/06/16/23/10/spice-370114_1280.jpg",
  "https://cdn.pixabay.com/photo/2015/08/13/18/47/spices-887348_1280.jpg",
  "https://cdn.pixabay.com/photo/2015/04/20/13/30/kitchen-731351_1280.jpg",
  "https://cdn.pixabay.com/photo/2015/07/02/10/40/writing-828911_1280.jpg"
]
const list = classpic.map((pic, i) => ({
  src: pic,
  thumbnail: pic.replace("1280","_480"), // for example
  thumbnailWidth: 156,
  thumbnailHeight: 156
}));

console.log(list)

score:0

const IMAGES = Class.classpic.map(pic => ({
  src: pic,
  thumbnail: pic,
  thumbnailWidth: 156,
  thumbnailHeight: 156
}));

Related Query

More Query from same tag