function imageShortcode(
		source,
		alt,
		cls,
		sizes = "(max-width: 768px) 100vw, 50vw",
	) {
		const options = {
			widths: [600, 900, 1500],
			formats: ["webp", "jpeg"],
			urlPath: "/assets/images/",
			outputDir: "./_site/assets/images/",
			filenameFormat(id, src, width, format) {
				const extension = path.extname(src);
				const name = path.basename(src, extension);

				return `${name}-${width}w.${format}`;
			},
		};

		/**
		 * Resolves source
		 * @returns {string} URL or a local file path
		 */
		function getSRC() {
			if (source.startsWith("http://") || source.startsWith("https://")) {
				return source;
			}

			/*
			 * for convenience, you only need to use the image's name in the shortcode,
			 * and this will handle appending the full path to it
			 */
			return path.join("./src/assets/images/", source);
		}

		const fullSrc = getSRC();

		// generate images
		Image(fullSrc, options); // eslint-disable-line new-cap -- `Image` is a function

		const imageAttributes = {
			alt,
			class: cls,
			sizes,
			loading: "lazy",
			decoding: "async",
		};

		// get metadata
		const metadata = Image.statsSync(fullSrc, options);

		return Image.generateHTML(metadata, imageAttributes);
	}
/*.md"),
	);

	// START, eleventy-img (https://www.11ty.dev/docs/plugins/image/)
	/* eslint-disable-next-line jsdoc/require-jsdoc
       --
       This shortcode is currently unused. If we are going to use it, add JSDoc
       and describe what exactly is this doing.