export function findAppropriateImage(images, wantedWidth) {
    const imagesSorted = images.sort((a, b) => a.width - b.width);
    for (const image of imagesSorted) {
        if (image.width >= wantedWidth) {
            return image;
        }
    }
    return images[images.length - 1];
}
//# sourceMappingURL=image.js.map