Image previews for links: a large preview on hover and a thumbnail next to the line number. Wikipedia/Commons file pages, image URLs, local image paths, and web pages (og:image).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Image previews for links in HTML and Markdown files: a large preview when you hover, and a small thumbnail next to the line number.
Supported links
Wikipedia / Wikimedia Commons file pages in any language (/wiki/File:..., /wiki/파일:...)
Direct image URLs (.jpg, .png, .gif, .webp, .svg ...)
Local image paths relative to the file (for example src="media/photo.jpg" in HTML, or img/photo.png in a Markdown image)
Web pages: the page's preview image (og:image) is shown on hover
Settings
commonsHover.width (default 400): hover preview width in pixels. Lower it if the preview covers too much code. 0 shows the original size.
commonsHover.gutterThumbnails (default on): thumbnail next to the line number. Web page links are not fetched for thumbnails.
commonsHover.fetchPageImages (default on): for web page links, the start of the page is downloaded when you hover. Turn off to avoid requests to those sites.
VS Code's own editor.hover.delay and editor.hover.above also control when and where the preview appears.
Notes
Remote thumbnails are downloaded once and kept in the extension's storage folder.
Pages without a preview image, or sites that block requests, show nothing. In that case copy the image address instead (right-click the image > Copy image address).
Install
VS Code: search "Commons Hover" in the Extensions view