• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

MicroPython ESP32 Web Server, how to display .png / .jpg / .gif photo?

Q&A Forum › MicroPython ESP32 Web Server, how to display .png / .jpg / .gif photo?
0 Vote Up Vote Down
wu.ginnan asked 6 years ago
5 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello, you would need to follow this post: https://rntlab.com/question/web-server-background-image/

Basically, you need to store the image (jpg, png, gif, etc) in a server and then just load it into your web page.

0 Vote Up Vote Down
wu.ginnan answered 6 years ago

Thanks !
 

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

You’re welcome! In the MicroPython web server, you would just need add this to the <sytle> tags to add it as a background:

<style>>body { background-image: url("http://the_url_to_your_image.gif"); }</style>

Or the following inside the <body> tags to add it in the middle of the web page:

<body><img src="http://the_url_to_your_image.gif"></body>

I hope that helps, Rui

0 Vote Up Vote Down
joao.oliveira.barros answered 5 years ago

Hello Rui,
and if the MicroPython web server is in ap mode and not station mode? (I have loaded the images in esp32, next to boot.py, with thonny).
 

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
I answered your question here: https://rntlab.com/question/webserver-show-image-loaded-in-esp32-in-micropython/
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.