User blog:Explodabat/Re-uploading icons

Overview All ship images (theoretically) are uploaded as "Shipname-icon.png" for the various galleries and the Ships page to properly render them. Although galleries can technically function with a variety of image styles and names, the Ships page specifically requires the "Shipname-icon.png" format to work.

Example Gallery

For more examples, check out any past or current Event pages (e.g. "Christmas Event 2018" or "Halloween Event 2019." These pages can also be found under the "More" navigation tab under the sub-tab "Events." Example "Ships" Menu This text and the ship "bubbles" would normally fall under a drop-down menu. I am purposely leaving it expanded so the example is visible.

Explanation of Issues The gallery and ship menu above show two proper images and one improper image. The Wasp and Tango are correctly formatted with their "-icon.png" file ending. The "PNG" filetype is required for the images to be transparent. The "-icon" is necessary because it is specifically referenced in the parameters of the " " template.

When you enter the name of the ship after calling the ShipLink template (e.g " ), the template automatically searches for a page with that ship's name and an image under the "Shipname-icon.png" title, in this case for the Wasp. If either of those are not found, the link or image turn red to indicate the file or page does not exist, as seen with the red "26px" in the incorrect ship.

Additionally, the image that appears in the gallery for the "incorrect ship" is not scaled to a 1:1 aspect ratio. The Wasp image, which is properly formatted, is 705px by 705px, which is a 1:1 aspect ratio. The incorrect image is 1,230px by 807px, which is 1.52416...:1 (not 1:1!). This causes it to be cropped off in the gallery preview. To counteract this, all "Shipname-icon.png" images should have a 1:1 aspect ratio.

Fixing the aspect ratio is usually pretty easy to achieve with most free image editors. paint.net, for example, has a "resize canvas" tool that allows you to make both the height and width of the image the same without distorting either dimension of the physical image. Windows' built in Paint and Paint 3D tools also have this ability (though the former can be a little inconsistent). In Paint, go to the "file" menu and click on properties. The bottom of the window should show a width and height that you can edit. In Paint 3D, select the three-dot menu on the top-right, and select "canvas options." From there, a similar width and height editor should appear, allowing you to input new values. Be aware that many image editors have a "lock aspect ratio" option that must be deselected in order to make both values the same. Proper Image Formatting and Uploading '''This is the important stuff. If you've glossed over the rest of the page, start reading here'''

Nearly every ship already has a "Shipname-icon.png" image. Therefore, rather than uploading a completely new image, all you need to do is re-upload the image to the same file name. To do so, click on the image of the ship while viewing the page, as seen in the video below.

Then, click on the image title in the preview to go to the page associated with that image. From there, you can go to "File History" and scroll to the bottom, where the link "upload a new version of this file" will appear. Once you click on this, all you have to do is upload your updated version of the image by selecting it in "browse."

Remember: All images uploaded to the "Shipname-icon.png" must have a 1:1 aspect ratio (e.g. 705px by 705px for the Wasp) to render properly in both the ShipLinks and Galleries.