Template:HD img



Documentation
This template solves the problem of small images appearing blurry when you add them on the wiki. Whenever you specify the dimensions of an image to fit it on a wiki page, the resolution of the image will automatically be scaled down to that dimension, keeping the same DPI. That means that if you zoom into the page or simply have a high-res screen, the image will appear blurry.

By inserting this template in place of an image, the image will appear at its original resolution at whatever size you choose to make it.

Visual Editor
If you're using the visual editor to edit your wiki, follow these steps.

1. Click "Insert," then click "Template." 2. Search for "HD img" and select the first result. 3. Specify the desired width, in pixels, of the image you want to appear on the wiki, under "width." 4. Under "align," specify which side of the page to align the image to. Use "left," "right," or "none." 5. Under "file," specify the local filepath of the image. 6. Under "link," paste the link the image will lead to when clicked. Leave blank if you want the image to be unclickable.

Classic/Source Editor
If you're using the source editor, adding this:

will yield this:

Notice that text flows around the image when it is aligned to the left. Also notice that if you zoom in, the image is still in high resolution.



If instead you had inserted the image the normal way by typing

you would've gotten this:



Notice that if you zoom in, the image is blurry. 

Drawbacks
Adding a template can be more troublesome, especially if the original image is small or appears small on the page anyway. Furthermore, loading high-res images may increase page loading time or slow down network traffic.

If the original image is small enough to fit on the page without any resizing, it is best to insert the image the old way. If the image is a low-res sprite, such as a small icon or button graphic, this template is probably not needed.

However, if your screen has high DPI (dots per inch), if you think viewers might zoom into the page, or if you simply notice that images tend to appear noticeably blurry, using the template would be a good solution.