Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Cómo añadir una imagen en WordPress widget de barra lateral

Nota editorial: Ganamos una comisión de los enlaces de socios en WPBeginner. Las comisiones no afectan a las opiniones o evaluaciones de nuestros editores. Más información sobre Proceso editorial.

¿Quieres añadir una imagen a un widget de barra lateral en WordPress?

Por defecto, WordPress facilita la subida y adición de imágenes en cualquier parte de su sitio web. Puedes añadirlas a los widgets de la barra lateral con la misma facilidad que a las páginas o entradas de blog.

En este artículo, le mostraremos cómo añadir fácilmente una imagen al widget de la barra lateral de WordPress.

How to add an image in WordPress sidebar widget

Compartiremos varios métodos para que pueda utilizar el que mejor se adapte a su sitio WordPress.

Sólo tiene que hacer clic en los enlaces siguientes para saltar a la sección que prefiera:

Añadir una imagen en WordPress usando el bloque de widget de imagen

Puede utilizar un bloque de widget de imagen para añadir imágenes a la barra lateral de su sitio.

El editor de bloques de widgets se introdujo en WordPress 5.8 y reproduce la experiencia de uso del editor de contenido de WordPress. Puedes utilizar diferentes bloques para añadir formularios, entradas relacionadas, imágenes y otros elementos al área de widgets mediante bloques.

Para empezar, tendrás que visitar la página Apariencia ” Widgets desde tu escritorio de WordPress. Después, simplemente haz clic en el botón “+” y añade un bloque de widgets de imagen.

Add an image widgets block

A continuación, puedes añadir una imagen en el bloque del widget de 3 maneras.

Por ejemplo, puede subir una imagen, elegir una imagen existente de su biblioteca de medios de WordPress o insertar la imagen desde una URL.

Upload image in widget block

En el editor de bloques de widgets, también tendrás opciones para cambiar el estilo, añadir un texto alternativo y modificar el tamaño de la imagen.

Hay ajustes para cambiar el borde de la imagen y otros ajustes avanzados.

Edit image widget block settings

Cuando hayas terminado, no olvides hacer clic en el botón “Actualizar”.

A continuación, puede visitar su sitio web y ver la imagen en la barra lateral.

View image in sidebar

Añadir una imagen en el área clásica de widgets de WordPress

Si utilizas una versión antigua de WordPress o has desactivado los bloques de widgets, también puedes añadir fácilmente una imagen a la barra lateral.

Simplemente ve a la página Apariencia ” Widgets desde tu panel de administrador de WordPress y añade el widget ‘Imagen’ a tu barra lateral. Si no ha utilizado widgets antes, consulte nuestra guía sobre cómo añadir y utilizar widgets en WordPress.

Add image widget

El widget se expandirá y podrás ver sus ajustes.

La primera opción es añadir un título al widget de imagen. Después, haz clic en el botón “Añadir imagen” para continuar.

Esto hará que aparezca el cargador de medios de WordPress, donde puede hacer clic en el botón de subir archivos para subir su imagen o seleccionar una imagen que haya subido anteriormente.

Image settings

Después de subir la imagen, verás los ajustes de imagen en la columna de la derecha. Desde aquí, puedes proporcionar un título o texto alternativo para la imagen, añadir una descripción, seleccionar el tamaño o incluso enlazarla.

Una vez que haya terminado, puede hacer clic en el botón “Añadir al widget” para guardar los cambios. Ahora verás una vista previa de la imagen dentro del área de ajustes del widget.

Widget preview

No olvides hacer clic en el botón “Guardar” para guardar tu widget de imágenes.

Ahora puede visitar su sitio web para ver la imagen en la barra lateral de su blog de WordPress.

Sidebar image preview

Añadir manualmente una imagen en WordPress Sidebar Widget

En algunos casos, puede que necesites añadir código HTML adicional a tu imagen. El widget de texto por defecto permite HTML muy básico, pero puede que no funcione con HTML o formato avanzados. En ese caso, tendrás que añadir manualmente una imagen a la barra lateral de tu blog.

En primer lugar, debe subir la imagen a su sitio de WordPress. Simplemente ve a Medios ” Añadir nuevo y sube tu archivo de imagen.

Después de subir la imagen, tiene que enlazar el enlace Editar situado al lado de la imagen.

Edit uploaded image

WordPress le llevará ahora a la página “Editar medios”, donde verá la URL del archivo de imagen en la parte derecha de la pantalla.

Debe copiar esta URL y pegarla en un editor de texto como el Bloc de notas.

Copy image file URL

A continuación, debe ir a la pantalla Apariencia ” Widgets de su escritorio de WordPress.

A continuación, puede añadir el bloque de widget “HTML personalizado” a la barra lateral donde desee mostrar la imagen.

Add custom html widget block

En el área del cuadro de texto del widget, tienes que añadir tu imagen utilizando este código:

<img src="Paste The File URL Here" alt="Strawberries" />

La etiqueta img se utiliza en HTML para mostrar imágenes. Necesita dos atributos. El primero es src, que define la ubicación del archivo de imagen. Aquí es donde pegarás la URL que has copiado antes.

La segunda es alt, que se utiliza para proporcionar un texto alternativo para la imagen. La etiqueta final de la imagen tendrá este aspecto:

<img src="http://www.example.com/wp-content/uploads/2014/09/strawberries.jpg" alt="Strawberries" />

Debe hacer clic en el botón “Actualizar” para almacenar los ajustes de su widget y, a continuación, obtener una vista previa de su sitio web.

Añadir una imagen en la barra lateral de WordPress usando un plugin

¿Te preguntas cómo añadir un widget de fotos utilizando un plugin de WordPress?

Otra forma de añadir imágenes a la barra lateral de WordPress es utilizando un plugin. Esto le dará algunas opciones más y una interfaz sencilla, que algunos principiantes pueden encontrar más fácil que el widget por defecto ‘Imagen’.

En primer lugar, debes instalar y activar el plugin Image Widget. Para más detalles, consulte nuestra guía paso a paso sobre cómo instalar un plugin de WordPress.

Una vez activado, sólo tienes que ir a la página Apariencia ” Widgets y añadir el bloque “Widget de imagen”.

Add image widget block

A continuación, haga clic en el botón “Seleccionar imagen” para subir una imagen o seleccionar una de la biblioteca de medios.

A continuación, haz clic en el botón “Insertar en widget” y verás la vista previa de la imagen en los ajustes del widget.

Select an image from library

Puede añadir un título o texto alternativo, así como un enlace y una leyenda para la imagen.

También puede elegir un tamaño de imagen de la lista de opciones disponibles, editar la alineación, etc.

Add title and alt text

Cuando estés satisfecho, sólo tienes que hacer clic en el botón Actualizar para guardar el widget de la imagen. Y ya está. Ahora puedes ir a tu sitio web y ver la imagen mostrada en tu barra lateral.

Esperamos que este artículo te haya ayudado a añadir una imagen al widget de la barra lateral de WordPress. Si te encuentras con algún problema, no olvides echar un vistazo a nuestra guía sobre cómo corregir problemas comunes de imágenes en WordPress y el mejor software de diseño para pequeñas empresas.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Descargo: Nuestro contenido está apoyado por los lectores. Esto significa que si hace clic en algunos de nuestros enlaces, podemos ganar una comisión. Vea cómo se financia WPBeginner , por qué es importante, y cómo puede apoyarnos. Aquí está nuestro proceso editorial .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

El último kit de herramientas de WordPress

Obtenga acceso GRATUITO a nuestro kit de herramientas - una colección de productos y recursos relacionados con WordPress que todo profesional debería tener!

Reader Interactions

51 comentariosDeja una respuesta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Holly says

    Hi,

    I just submitted a question about my image only showing up on the home page and not other pages on the site. I resolved my issue and wanted to share the solution in case it helps someone else. I was trying to use the Custom HTML widget to SHOW a couple of images to my Content Sidebar and when I specifically configured the addition of the pages I wanted to show, (leaving “Match all” UNchecked), the images only showed up on the Home page.

    The solution was to reverse it and tell the widget to HIDE if the page was 404 (or whatever you want). Now the images show up on the sidebar of all my pages. :-)

    Thank you,
    Holly

  3. Holly says

    Hi,

    I got the custom HTML widget working on the home page but the images are not showing up on the other static pages. I configured the settings to “Show if” my desired pages are selected but the image only shows up on the home page. I’ve tried deleting and re-adding the widget and removing and re-adding pages. Any ideas?

    Thank you!
    Holly

    • WPBeginner Support says

      Depending on your theme, the widget area you are placing it at may only display on your home page. You would want to check with the theme’s support for where those widgets should show :)

      Administrador

  4. Alice says

    Hi, I am trying to add the picture and have it show up in the upper left corner of the post. When I add it and preview everything is there but when I publish it is not there. Any ideas?

  5. Kathy Turner says

    I have added an image to my footer and in Chrome on a desktop it appears and then immediately disappears. I have reduced the size, I have tried adding it as an image in html but nothing solves the problem. On chrome on my mobile it is fine. I don’t have adblock on my desktop. The problem also occurs with Firefox but Microsoft Edge all works fine. Any ideas?

  6. harika says

    hi i have created blog in wordpress but posting content language is telugu.i want to change the font style of telugu post how?

  7. Micky says

    Hi there,

    I’ve tried both mehods listed in this video, and still the sidebar image is not showing up at all.

    Any ideas on how I could trouble shoot this?

    Thanks!

  8. Rebecca Claxton says

    Thanks for always being top of random searches I do for WordPress stuff – and thanks for the useful info suitable for everyday folk using WP!

  9. Karthik Marripoodi says

    Thanks for writing about this in detail. I want to put my ads on the widget section. This method will perfectly suit my requirement. But I just have one problem. How to add different image for different blog posts. Is there a way to do that?

  10. Mark says

    I believe the video said “Alt tag”. That wouldn’t be the correct terminology – it would be the Alt Attribute of the tag.

  11. Victoria says

    Love this tutorial, however I am skeptical to download the image widget because it says that it is untested with my version of WordPress. Will there be updates coming soon or how does it get tested with my version of WordPress?

  12. melessa says

    Hi, I hope I didn’t overlook it somewhere in the comments, but how do you put a circular or oval instead of square image for the about me in side bar? I’m using divi by elegant themes.

  13. Rod says

    Hi,

    Any idea why bullet points wouldn’t show up in the sidebar widgets despite having taken off “list-style-type: none” from the css file and replaced it with the following code and it still doesn’t work:

    .widget ul li { list-style: circle }

  14. David says

    wow! spot on. The visual text is too much work for just a plain image. I have been looking for a plugin that does exactly this. thanks a lot

  15. Jana says

    Hi,
    I have a couple of questions. First, I am having trouble installing the Widget Image plugin for some reason. I’ve installed plugins before but I can’t seem to do this one. Granted, I’m a beginner and I added them almost a year ago so maybe I’ve forgotten something. Can you give me any tips?

    Also, believe it or not, I got a picture on my widget using the html coding! (Surprised I could code, but you made it very easy and understandable) The only problem I have is that it is full size and I’m hoping to have thumbnails. Is there code for that? If so, I don’t need to install the plugin.
    Thanks!

  16. James McAllister says

    I had a read at this to try and update the image I have on a widget on my blog.

    Are you guys on the same planet as the rest of us? Have a read at what you wrote – you’d have to be a Philadelphia lawyer crossed with Steve Jobs to understand the instructions.

    Anyway – back to trying to change the image, I’m sure the trick is in there somewhere.

  17. Marvis says

    Thank you so much for this info. But i really need to know how to display google ads on my posts and sidebar as well. I have an approved adsense account already and i have generated the ad code. But the next step to take is what i don’t get. I need help please.

  18. Abbie says

    Either I have overlooked many things you have talked about or the site has changed. I do see an option for an image widget which you state does not exist. I do not see any media or gallery to which I can upload an image file.

    So, where do I upload the file so I can get a URL to put in the necessary place on the form to set up the image widget?

  19. Erica says

    Hi there. I know how to get the images in the sidebar, but they take up too much space so I am trying to do a click-through gallery here. I get the little click-through box, but no images show. I was also able to do an auto-slideshow, but it is very distracting so I don’t want that. I just want the photo gallery that you click through to the next image, but I can’t find anything on how to fix this here.

  20. Giulia says

    Hi,

    I am having an issue adding image widgets. When I try adding a new one (after having deleted one too) the changes don’t save, the page stops loading, and when I try to access the site (admin and normal) it says can’t connect to server – so basically my site is down. I restarted my computer and installed updates and this solved it the first time, but when I tried adding the widget again the same thing happened, except restarting doesn’t seem to help anymore!

    Please help! I would really appreciate it!

    Thanks in advance!

  21. Gregor Egan says

    Hi, Thanks for that, it works a treat. I have a question; I don’t want the same image to appear on every page so how to I restrict it to a particular page so that I can use a different image on subsequent pages.

    Regards,

    Gregor

  22. Lee says

    Thank you, the video is helpful but you zip through the dialogue so fast I had to hit pause, rewind pause, pause, repeat….many times. Please realize some of us are ABSOLUTE newbies on WordPress. Thanks for the great material…but slower would be more helpful. :-)

  23. Sheryl Anderson says

    I have the image in the widget – what I want to know is how to point that widget to an opt-in form – how do you add that code

Deja tu comentario

Gracias por elegir dejar un comentario. Tenga en cuenta que todos los comentarios son moderados de acuerdo con nuestros política de comentarios, y su dirección de correo electrónico NO será publicada. Por favor, NO utilice palabras clave en el campo de nombre. Tengamos una conversación personal y significativa.