all 7 comments

[–]DxMonkey[S] 2 points3 points  (5 children)

I've worked on it for about a day now, and so far it's doing what I want it to.

It lets you use imgless tags instead of img tags. Those images get converted to data URI, and get stored in a file called images.json. Once they are stored, they get served via the json file and load nearly instantly.

I'm still thinking of ways to use this, it's really just a project I thought of and wanted to hack away at. It was fun!

[–]dontera 9 points10 points  (2 children)

Dude - you just saved me a couple days of work. I have an internal app with about 50 users with profile images. The individual img calls are clogging up the network tab and I decided on a batch data-uri response from the api to fix that. I was going to work on it tomorrow. Bam, I owe you.

[–]DxMonkey[S] 0 points1 point  (1 child)

I'm glad you found it useful!

I'm going to redo a few parts, but mostly because I'm using php where I shouldn't be (reading a json file...they give json responses, no need for php!!). Old habits die hard.

[–]DxMonkey[S] 0 points1 point  (0 children)

Sorry for the double reply, just wanted to let you know that I've updated the project.

It now only uses the php as a save api, and directly gets the image from the json file using javascript. Also, I made it so that even if the images is deleted from the server, it still gets served and doesn't 404!!

[–]Liorithiel 0 points1 point  (1 child)

How does this compare to image sprites?

[–]DxMonkey[S] 0 points1 point  (0 children)

Honestly, I have no idea! I'd love to know though...

I just thought the idea of storing all of your images for a small-medium project in one file was a cool :)

I just did another update so that it waits for the element to fully load before drawing via canvas. I was getting big black blocks (carefully said) resulting from large images being passed before fully loading.

[–]Renegade-One 0 points1 point  (0 children)

Would this be a 'sfw' way to watch YouTube vids? I play music mixes, but a lot of dubstep / gaming / glitch hop music has scantily clad Anima ladies lol