How to display image from SD

I can’t recompile everything when I want to add a new history with image choice…
What is strange is when I am trying this, it returns nothing…

    String filePath = "Disney.png"; // Adjust the path as needed
    if (SD.exists(filePath)) {
        Serial.println("PNG image exists: " + filePath);
    } else {
        Serial.println("PNG image does not exist: " + filePath);
    }

EDIT : oh well maybe I found the issue about the SD. Trying a fix.
what a pain, the doc is plenty of error 404 pages… not really serious

Fix is ok , but as i wrote use little image from SD is waste energy. Place it in assets ofcourse if is static

Any help from someone please? Still cannot display an image from SD

Maybe I missed something

With an image from SquareLine which has been compiled and declared it works but I cannot use that method. I need to have pictures on the SD card

I think thje S drive I ve set in the conf does not working.

If I need nothing I will ask here next time… everytime the same thing with those techs…

Hello,

Perhaps you just need to be more patient. Have you read the docs on images: Images — LVGL documentation ?

To handle non-built-in image formats, you need to use external libraries and attach them to LVGL via the Image decoder interface.

LVGL cannot directly work with image files like JPG or PNG, these image files have to be decoded first:

IMAGE DECODER
As you can see in the Color formats section, LVGL supports several built-in image formats. In many cases, these will be all you need. LVGL doesn’t directly support, however, generic image formats like PNG or JPG.
To handle non-built-in image formats, you need to use external libraries and attach them to LVGL via the Image decoder interface.

See the image decoder section! For this you will need some sort of JPG (or whatever) decoder, if you’re lucky, whatever MCU you use, has specialized hardware for this… otherwise it’s very slow.