• 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 2 years ago
5 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 2 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 2 years ago

Thanks !
 

0 Vote Up Vote Down
Rui Santos Staff answered 2 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 10 months 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 10 months 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] Download Build Web Servers with ESP32 and ESP8266 (version 2.1) April 14, 2021
  • [eBook Updated] Download Build Web Servers with ESP32 and ESP8266 (2nd Edition) February 8, 2021

You must be logged in to view this content.

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

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