So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By QuickFix
#80103
pablopablo wrote:- Image not accessible: put it in SPIFFS and try (as a test) to retrieve it separately by invoking the URL of the image directly

Not sure what you mean here, however when I have it in data file and open it in browser it works no problem.

You might have to change your code from being a captive portal to a regular webserver to check this:If your image does work now, it might be the max. 4-5 connections problem or the code that is blocking at every request.

pablopablo wrote:- Link to image in HTML-page is incorrect: make sure the link is relative

I think I have this correct in hte html file (which is also in data folder) I have

Code: Select all<img src="image.jpg" width="600" height="600"> 


I have also tried this
Code: Select all<img src="/Users/Me/Desktop/wifi/data/image.jpg" width="600" height="600"> 

The first link should work, the second one won't since that's referencing a file on your PC and not the ESP.
You might need to precede the link with a dot and a forward slash (not sure if this is mandatory or not):
Code: Select all<img src="./image.jpg" />


And, like Rudy said: make sure the filename matches fully, including capitalization (been there, done that as well). ;)
User avatar
By pablopablo
#80109 Hey Rudy,

Thanks for your reply :D ...glad to hear that you were able to get bigger images to work, it gives me hope!

I have checked + Double Checked + Tripled Checkd X 100 that files are names correctly, so I'm almost certain that this is not the issue.


rudy wrote:Code to have the browser not send additional requests, until the current ones are in, is what I planned to do to compensate for this.


Would you be able to advise me on how I can go about this? As in should I be trying to code this in hte .ino sketch or the htm?

Thanks again!
User avatar
By pablopablo
#80110 Hey Quickfix,

Thanks again for the help

You might have to change your code from being a captive portal to a regular webserver to check this:
Connect to your ESP
Open a browser window
Surf to: http://IP.OF.YOUR.ESP/image.jpg
If your image does work now, it might be the max. 4-5 connections problem or the code that is blocking at every request.


OK, tried this but just getting a broken image 'logo' ....re: 'the code that is blocking at every request'..is there a way of avoiding this?

I tried this too:

Code: Select all<img src="./image.jpg" />


But again broken image link.
The first link should work, the second one won't since that's referencing a file on your PC and not the ESP.


Doh, well that's just embarrassing on my part !

Code: Select allAnd, like Rudy said: make sure the filename matches fully, including capitalization (been there, done that as well).


Yeah I've made sure file is named correctly.

I also tried another ESP2866 but having the same problem, so it's not the board
User avatar
By QuickFix
#80122
pablopablo wrote:
Surf to: http://IP.OF.YOUR.ESP/image.jpg

OK, tried this but just getting a broken image 'logo' ....re: 'the code that is blocking at every request'..is there a way of avoiding this?

If the direct request of the image isn't working, then that's where the problem is in your code.
You should build in some debug-to-serial routines that dumps the request when a GET-request is made and what your code is doing in response to that. :idea: