WordPress Tutorial: When to set Attachments as Media Files

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

A screenshot of the attachment details link to selection when adding new documents to WordPress using the media uploader.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:

  1. Place your cursor where you’d like your file to appear in your post or page.
    A screenshot which demonstrates placing your cursor where you want the image to appear in your post or page in the WordPress Editor
  2. Click on the Add Media icon found directly above your editor.
    A screenshot of the Add Media button in the WordPress editor
  3. Simply drag and drop your files into the box that appears, or click Select Files to choose a file from your computer to upload.
    A screenshot showing how to upload files to WordPress.
  4. 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.
    A screenshot demonstrating how to insert media files into a WordPress page or post.
  5. Click the Insert into post button.
    An image of the Insert Into Post button in the WordPress Media Uploader.


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:
A screenshot of what happens when a user clicks on an image in WordPress that has been incorrectly 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?”

In contrast, the following image is correctly set as an Attachment Page:
A screenshot demonstrating an image correctly set as an Attachment Page in WordPress.The WordPress front-end and the user experience are preserved.

Supporting Articles

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s