WordPress attachment functions

What is an attachment in WordPress?

The term attachment is used for files uploaded to WordPress from post edit screen. Files uploaded directly to the Media Library are not particularly attached to a post or page. An attachment can be any file that can be uploaded using the media upload.

WordPress attachment functions

Below are the list of WordPress attachment functions:

  • get_attached_file
  • image_resize (deprecated)
  • image_edit_before_change (ported to WP_Image_Editor object)
  • is_attachment
  • is_local_attachment
  • set_post_thumbnail
  • update_attached_file
  • wp_attachment_is_image
  • wp_create_thumbnail (deprecated)
  • wp_insert_attachment
  • wp_delete_attachment
  • wp_get_attachment_image
  • wp_get_attachment_link
  • wp_get_attachment_image_src
  • wp_get_attachment_metadata
  • wp_get_attachment_thumb_file
  • wp_get_attachment_thumb_url
  • wp_get_attachment_url
  • wp_check_for_changed_slugs
  • wp_count_posts
  • wp_get_mime_types
  • wp_mime_type_icon
  • wp_generate_attachment_metadata
  • wp_prepare_attachment_for_js
  • wp_update_attachment_metadata

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.