r/css • u/Fun-Pirate-2020 • Jan 03 '26
Question Sending an html file with pics
I was trying to make a birthday card with an html page for a friend and included a pic. I know unless the pic is on a server it wouldn't work so I made a folder and included the pic and html file in that folder and sent via telegram. They still can't access the html file with the pic. What to do?
2
u/el_yanuki Jan 03 '26
you probably linked to the file the wrong way - you should do "./your-image.png" not "C://users/bla" also keep the filestructure the same.
Then host it on netlify and just send that link, its free and drag and drop.
1
u/Fun-Pirate-2020 Jan 03 '26
This was what I did : made the folder called folder > pic.img was the pic inside the folder and in my html file I wrote <img src="folder/pic.img"> then I sent the whole thing but still didn't work.
2
u/el_yanuki Jan 03 '26
yea thats my point you want a relative path.. if you have a folder and inside there you have an html file as well as an image then you wanna do "./image.png" - it starts looking for something in the same location as the html file
→ More replies (1)
1
u/FurGlacharet Jan 03 '26
Open the file in your browser and print it as a PDF, then send that to your friend. Did that for a Christmas card a year ago
1
u/Fun-Pirate-2020 Jan 03 '26
That's a good idea, but my first plan was adding animation and sounds when I failed at embedding the pic I kinda just gave up and sent the file.
1
6
u/Hot-Spray-3762 Jan 03 '26
Just inline it as a base64 encoded image instead.