When writing a post or a page it is often useful to attach audio, video, images, text files, or zipped files to your post or page. The method you use to attach your files will play an important role in how your documents are presented in WordPress. This article will discuss when, and why you should set your attachments as Media Files, and will provide a step-by-step tutorial on how to do this.
When to set an attachment as a Media File
If you are attaching data files that contain written text, or zipped data files, it is best to set them as Media Files. This preserves usability and provides the best possible user experience.
This is done because when set as a Media File, your file will open as expected, on the first click.
If your file is set as an Attachment Page, the link to your file will redundantly open up an attachment page containing a link to your file, as demonstrated later in this tutorial.
WordPress.com will accept the following data file types, which should be attached as Media Files:
- .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .zip
Note: WordPress.com does not support the .psd file format. However, other versions of WordPress (Self-Hosted, Manged, etc.) support all of the above with the addition of .psd.
How to set an attachment as a Media File:
- Place your cursor where you’d like your file to appear in your post or page.
- Click on the Add Media icon found directly above your editor.
- Simply drag and drop your files into the box that appears, or click Select Files to choose a file from your computer to upload.
- Once the file has finished uploading, make sure to select Media File from the Attachment Display Settings drop down menu. This ensures that text added to your post will actually link to the file you have just uploaded.
- Click the Insert into post button.
You should now have a correctly formatted link to your file.
Try the links below and see for yourself what happens:
When not to set an attachment as a Media File:
If you are adding the following file types, they should be set as an Attachment Page, not as Media Files.
- Images, Video, Audio
The image below demonstrates what happens when an image is set as a Media File instead of an Attachment Page:
The image is devoid of the WordPress front-end. This can potentially confuse your audience and begs the question “Where did the website go? Where am I?”
- Uploading Documents – WordPress.com Support
- Uploading Images – WordPress.com Support
- Image Settings – WordPress.com Support
- Uploading and Inserting Media – WordPress.com Support
- Importance of Image Attachments in WordPress – ClarkWP Magazine