Title: Auto-populate Image ALT Tags from Media Library
Author: Taylor Callsen
Published: <strong>23 de febrero de  2018</strong>
Last modified: 7 de marzo de  2018

---

Buscar plugins

Este plugin **no se ha probado con las últimas 3 versiones mayores de WordPress**.
Puede que ya no tenga asistencia ni lo mantenga nadie, o puede que tenga problemas
de compatibilidad cuando se usa con las versiones más recientes de WordPress.

![](https://s.w.org/plugins/geopattern-icon/auto-populate-image-alt-tags-from-media-
library.svg)

# Auto-populate Image ALT Tags from Media Library

 Por [Taylor Callsen](https://profiles.wordpress.org/tdcdodger/)

[Descargar](https://downloads.wordpress.org/plugin/auto-populate-image-alt-tags-from-media-library.zip)

 * [Detalles](https://es-ar.wordpress.org/plugins/auto-populate-image-alt-tags-from-media-library/#description)
 * [Valoraciones](https://es-ar.wordpress.org/plugins/auto-populate-image-alt-tags-from-media-library/#reviews)
 *  [Instalación](https://es-ar.wordpress.org/plugins/auto-populate-image-alt-tags-from-media-library/#installation)
 * [Desarrollo](https://es-ar.wordpress.org/plugins/auto-populate-image-alt-tags-from-media-library/#developers)

 [Soporte](https://wordpress.org/support/plugin/auto-populate-image-alt-tags-from-media-library/)

## Descripción

Automatically populates Alt and Title tags for images featured in posts and pages,
pulling directly from the values set in the Media Library. This makes it easy to
manage your image metadata centrally in one place (the Media Library). Plugin also
supports the ability to override the Alt/Title tag Media Library values by placing
an Alt/Title tag directly on the attachment in the WordPress WYSIWYG Editor.

Tag population only occurs when viewing the post or page, and does not occur in 
the WYSIWYG editor.

## Instalación

This section describes how to install the plugin and get it working.

 1. Upload the `img-alt-media-library` directory to the plugins directory of your theme(
    usually `/wp-content/plugins/`).
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.

That’s all, you’re good to go! Upon viewing your posts and pages, you should now
see image Alt and Title tags being pulled automatically from the Media Library.

## Preguntas frecuentes

  How does it work?

This plugin hooks into the the_content filter on page and post render. Essentially
right before post_content (in the form of raw HTML) is set to the browser, this 
plugin will scan the HTML for tags using a regex matcher. Regex was used instead
of parsing the HTML into a Document Object to maximize compatibility (parsing the
HTML into a Document Object, and then back to an HTML string would likely modify
the HTML syntax, drop attributes, etc. which could break other components and post
functionality).

Once images are identified in the HTML, the image src URL is used to lookup the 
attachment ID corresponding to the image. Unfortunately I was not able to find a
cleaner way of performing this lookup, as the image ID is not always output onto
the page when an attachment is included.

Once the image ID is determined, the plugin retrieves the image Alt and Title values
for that attachment using the get_post_meta() and get_the_title() WordPress functions.
Once these values are returned, they are added to the image unless the image already
contains an alt or title tag, in which case this part is skipped.

The modified image HTML is placed back into the post_content HTML string, and returned
to the browser.

## Reseñas

No hay reseñas para este plugin.

## Colaboradores y desarrolladores

“Auto-populate Image ALT Tags from Media Library” es un software de código abierto.
Las siguientes personas han colaborado con este plugin.

Colaboradores

 *   [ Taylor Callsen ](https://profiles.wordpress.org/tdcdodger/)

[Traduce “Auto-populate Image ALT Tags from Media Library” a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/auto-populate-image-alt-tags-from-media-library)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/auto-populate-image-alt-tags-from-media-library/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/auto-populate-image-alt-tags-from-media-library/),
o suscríbete al [log de desarrollo](https://plugins.trac.wordpress.org/log/auto-populate-image-alt-tags-from-media-library/)
por [RSS](https://plugins.trac.wordpress.org/log/auto-populate-image-alt-tags-from-media-library/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 1.1

 * Updated “Tested up to” tag on readme

#### 1.0

 * Initial release of functional code and readme

## Meta

 *  Versión **1.1**
 *  Última actualización **hace 9 años**
 *  Instalaciones activas **10+**
 *  Versión de WordPress ** 4.7.5 o superior **
 *  Testeado hasta **4.9.34**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/auto-populate-image-alt-tags-from-media-library/)
 * Etiquetas:
 * [alt](https://es-ar.wordpress.org/plugins/tags/alt/)[attribute](https://es-ar.wordpress.org/plugins/tags/attribute/)
   [image](https://es-ar.wordpress.org/plugins/tags/image/)[img](https://es-ar.wordpress.org/plugins/tags/img/)
   [title](https://es-ar.wordpress.org/plugins/tags/title/)
 *  [Vista avanzada](https://es-ar.wordpress.org/plugins/auto-populate-image-alt-tags-from-media-library/advanced/)

## Valoraciones

Todavía no se enviaron reseñas.

[Your review](https://wordpress.org/support/plugin/auto-populate-image-alt-tags-from-media-library/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/auto-populate-image-alt-tags-from-media-library/reviews/)

## Colaboradores

 *   [ Taylor Callsen ](https://profiles.wordpress.org/tdcdodger/)

## Soporte

¿Tenés algo que decir? ¿Necesitás ayuda?

 [Ver el foro de asistencia](https://wordpress.org/support/plugin/auto-populate-image-alt-tags-from-media-library/)