• 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

How to display an SPIFF jpg in an img tag of the web page

Q&A Forum › Category: ESP32 › How to display an SPIFF jpg in an img tag of the web page
0 Vote Up Vote Down
Peter Poesel asked 3 years ago
6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
The answer is in this tutorial: https://randomnerdtutorials.com/display-images-esp32-esp8266-web-server/
See section number 2.
I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
Peter Poesel answered 3 years ago

Hi SARA, Many thanks for your fast reply.
server.on(“/img”, HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, “/Meise.jpg”, “image/jpeg”);
});
The browser receives the picture and displays it fullscreen.
On my webpage I have a table. And in one cell I want to use the picture as a background.
This is my problem.
I will be off for a week. Therefore dont hurry, if you want to answer.
Kind regards Peter Poesel

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

Hi.
For that you need CSS. 
Check the following discussion: https://stackoverflow.com/questions/28422551/adding-a-background-image-to-a-single-table-cell
I think it is exactly what you’re looking for.
Regards,
Sara

0 Vote Up Vote Down
Peter Poesel answered 3 years ago

Many thanks for your detaled answer, I could solve my problem.
Kind regards Peter POESEL

0 Vote Up Vote Down
Peter Poesel answered 3 years ago

Many thanks for your detaled answer, I could solve my problem.
Kind regards Peter POESEL

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

Great!
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 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.