Title: Remove Hyphens from ALT
Last modified: December 2, 2017

---

# Remove Hyphens from ALT

 *  Resolved [jake92](https://wordpress.org/support/users/jake92/)
 * (@jake92)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/remove-hyphens-from-alt/)
 * Hi,
 * I’ve changed my alt text to the filename of the image, but it still has the hyphens:–
   between words. I’ve looked through all your related posts but can’t figure out
   how to get rid of them.
 * Could you explain how I can do this simply please?
 * Thanks
    Jake

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [jake92](https://wordpress.org/support/users/jake92/)
 * (@jake92)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/remove-hyphens-from-alt/#post-9744338)
 * Oh and replace the hyphen with a space
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/remove-hyphens-from-alt/#post-9746277)
 * Thanks for the question; I will try to give you a simple answer.
 * You can replace the hyphens with spaces in your existing ALT Text values using
   the new “str_replace” format option code added to the most recent MLA version.
   This is described in a recent topic:
 * [Remove commas from comma-delimited lists](https://wordpress.org/support/topic/remove-commas-from-comma-delimited-lists/)
 * You don’t say how you set the ALT Text to the file name; if you are using the
   Media/Assistant Bulk Edit area you can enter one of these values in the ALT Text
   text box:
 * `template:[+name_only,str_replace( '-', ' ' )+]` – will replace the ALT Text 
   value with a fresh copy of the name portion of the attached file and will replace
   hyphens with spaces in the new value.
 * `template:[+post_excerpt,str_replace( '-', ' ' )+]` – will use the existing ALT
   Text value (post_excerpt) and replace hyphens with spaces.
 * I am away from my own system until December 11 and haven’t been able to test 
   the second alternative. Of course, it **_should_** work.
 * You can get additional information in this earlier topic, which you probably 
   already found:
 * [Bulk ALT Text same as image file name](https://wordpress.org/support/topic/bulk-alt-text-same-as-image-file-name/)
 * That topic links to an even earlier topic that explains how to use an IPTC/EXIF
   mapping rule as an alternative to the Bulk Edit area.
 * I am marking this topic resolved, but please update it if you have any problems
   or questions regarding the above suggestions. As I wrote, I am traveling until
   12/11 so my response(s) may be delayed. Thanks for your interest in the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove Hyphens from ALT’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/remove-hyphens-from-alt/#post-9746277)
 * Status: resolved