Plugin Directory

Test out the new Plugin Directory and let us know what you think.


Attachments allows you to simply append any number of items from your WordPress Media Library to Posts, Pages, and Custom Post Types

Please see Attachments' changelog on GitHub


  • Fixed a regression that prevented attaching multiple files at once


  • Fixed an issue where changing an Attachment on more than one Attachment would continually update the first Attachment
  • Media modal now includes filters (props marcochiesi)
  • Added German translation (props bessl)
  • Added filter to manipulate Attachments metadata before it's saved: attachments_meta_before_save
  • Underscores are no longer enforced over hyphens
  • More entropy for Attachments uid's to prevent collisions (props sketchpad)


  • Fixed an issue where field values were improperly overwritten when the instance was set to prepend in some cases


  • Fixed assumption of field keys (props bukka)
  • Improved documentation (props Lane Goldberg, Roman Kokarev, Ore Landau)
  • Added rewind() method to reset Attachments reference array (props joost de keijzer)
  • TinyMCE fix to support WordPress 3.9+
  • Fixed an issue where nonce was potentially wrongly flagged as sent if an instance was filtered
  • Added post_parent argument support for instances, setting to true will populate the Uploaded to column in Media
  • New filter: attachments_default_instance to disable/enable the default instance (default is true, ATTACHMENTS_DEFAULT_INSTANCE constant is deprecated)
  • New filter: attachments_settings_screen to hide/show the settings screen (default is true, ATTACHMENTS_SETTINGS_SCREEN constant is deprecated)
  • Fixed an issue where Attachments meta box(es) would not show up when creating new posts whose post_type had a dash in it
  • Updated Italian translation (props Luca Speranza)


  • Cleaned up PHP Warning/Notice (props Mike C.)
  • Fixed a potential fatal error triggered by deleting something from the Media library that was an Attachment
  • Tested with WordPress 3.7


  • Fixed an issue where newline characters may not be properly retrieved
  • Fixed an issue with localization not initializing properly
  • Resolved a PHP Strict warning (props @bukka)

  • Fixed an issue where Featured Images may have become inadvertently disabled, props @deborre


  • Fixed an issue where changing an Attachment changed all attachments, props @bartoszwww
  • Fixed an issue where certain Unicode characters weren't decoded properly, props @stuk88


  • Initial implementation of limiting the number of Attachments
  • You can now change an Attachment asset without having to remove the entire Attachment and re-add something new
  • New filter: attachments_location_{my_instance} (where **{my_instance}** is your instance name) allows for more fine-grained control over where meta boxes show up (e.g. limiting to your Home page)
  • New action: attachments_extension facilitates Attachments extensions
  • New method width( $size ) to retrieve the width of the current Attachment
  • New method height( $size ) to retrieve the height of the current Attachment
  • New document structure, various additions to documentation
  • Attachments Pro migration script. If you've been waiting to migrate from Attachments Pro please back up your database and run the migration script.
  • Fixed an asset URL issue if Attachments is added as a must-use plugin
  • Italian translation (props Marco Chiesi)


  • Attachments now takes into account media deleted outside Attachments meta boxes and removes deleted attachments automatically
  • Added working Polish translation, props @mleczakm

  • Fixed a regression that prevented the type method from returning


  • Fixed an issue where the languages directory wouldn't be utilized for l10n
  • Search now respects custom meta_key
  • You can now pass in a filetype parameter when searching to limit results in that way


  • Class abstraction and cleanup
  • Better support for plugin-created custom image sizes


  • New filter: attachments_meta_key facilitates using a different meta key for Attachments storage
  • New filter: attachments_get_ **{my_instance}** (where **{my_instance}** is your instance name) allows you to filter Attachments per instance once they've been retrieved
  • Fixed an issue where retrieving single Attachments didn't properly pass the index to attribute methods
  • Fixed PHP Warnings when Network Activating
  • You can now have new Attachments prepend the list instead of append by setting append => false in your instance


  • Fixed a PHP Warning when activated using Multisite
  • Slightly modified the migration process to better handle plugins like WPML (props sebastian.friedrich)


  • You can now specify which view is default when browsing the Media modal (e.g. have 'Upload Files' be default instead of 'Media Library')


  • Added meta box positioning arguments when registering instances
  • Cleaned up some CSS when Attachments instances are in the sidebar


  • Added a search() method to allow searching for Attachments based on their attributes (e.g. attachment ID, post ID, post type, field values, etc.)
  • Improved the 'Remove' animation
  • New field: select
  • New parameter for Attachments attributes methods. You can pass the index (int) of the Attachment you'd like to utilize when firing the method.


  • Added option to disable the Settings screen
  • Added the ability to set a default for fields using the metadata that exists in WordPress. Available defaults include: title, caption, alt, and description. If set, the metadata for the correlating field will be used as the field default when initially adding an Attachment from the Media modal. Only applies to text, textarea, and wysiwyg fields.
  • Added a get_single() method that allows you to specifically retrieve a single Attachment
  • Clarified some documentation


  • Changed 'Delete' to 'Remove' so as to not make it sound like the file itself would be deleted from Media (props Lane Goldberg)
  • Better handling of posts that have no Attachments when saving


  • Fixed a potential issue with the WYSIWYG field not working on CPT without editor support
  • Field assets are less aggressive and only fire when necessary
  • Reorganized the migration process a bit in prep for Attachments Pro support


  • Fixed a regression that prevented successful migration of legacy Attachments data


  • Fixed a Fatal Error when registering the text field


  • New field: wysiwyg
  • Fields will now properly respect line breaks
  • Fields will now properly return HTML instead of escaped HTML


  • Fixed an issue where special characters would break title/caption fields during migration

  • Fixed a CSS issue with only one text field

  • Better storage of special characters for PHP 5.4+


  • Fixed an issue in Firefox where you weren't able to focus inputs unless you clicked their label
  • New field: textarea


  • Proper sanitization of Custom Post Type names (as WordPress does it)


  • Fixed a possible JavaScript error if an Attachment that's an image doesn't have a proper thumbnail URL
  • Added a total() method that will return the number of Attachments for the current instance
  • When requesting the image() for a non-image Attachment, the WordPress-defined icon will be returned
  • Added an icon() method that will return the WordPress-defined icon for the Attachment
  • Cleaned up a PHP Warning when trying to save for an undefined field type
  • Fixed an issue where template tags would be output for non-image Attachments after saving


  • Fixed a regression in handling Custom Post Type names that would too aggressively interfere with instance regustration
  • Fixed an issue when working with non-image Attachments


  • Fixed an issue that prevented the choosing of a Featured Image for a Custom Post Type if Attachments was activated
  • Attachments now only enqueues its assets on edit screens that actually utilize Attachments
  • Fixed a potential JavaScript error triggered when a 'thumbnail' image size was not available
  • Prevented incorrect usage of dashes used in CPT names for post_type argument when registering Attachments instances (fixes an integration issue with WP e-Commerce)
  • Prevented re-running of migration process to avoid duplicates (e.g. on browser reload)


  • Fixed an issue that prevented defining a post ID when retrieving Attachments outside The Loop
  • Cleaned up potential PHP warning when Attachments were requested for a post that had none


  • Fixed an issue where some HTML entities were not properly stored


  • Fixed an issue where legacy mode was always enabled


  • Major rewrite. After three years of development, Attachments has been rewritten to make even better use of what WordPress has to offer
  • Utilizes the brand spanking new 3.5 Media workflow
  • Configuration now takes place within your theme or a plugin
  • Multiple meta boxes! You can segment groups of Attachments with new instances, each unique
  • Dynamic fields! You can manipulate which fields each instance uses
  • File type limits. Limit which files are available to Attachments (e.g. images, audio, video)

Requires: 3.0 or higher
Compatible up to: 4.2.11
Last Updated: 2 years ago
Active Installs: 20,000+


4.8 out of 5 stars


0 of 2 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,2,2 100,2,2 100,1,1
100,1,1 100,4,4 100,1,1
100,1,1 100,4,4 100,1,1 100,5,5 100,2,2 100,2,2 100,1,1 0,1,0
100,2,2 100,4,4
100,1,1 100,1,1
57,7,4 100,2,2 100,2,2 100,2,2 100,3,3 100,2,2
100,1,1 100,7,7
50,2,1 50,2,1 100,6,6
100,4,4 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,2,2 100,2,2 100,1,1
100,1,1 100,1,1 100,1,1 100,4,4 100,2,2 100,1,1 100,4,4