How to replace the image to base64 in js file?

code for unanimiously pictures created in dreamViewer

part of the code:
lib.properties = {
 id: '611E01E049E04DFEBE63A8A13FA597E2',
 width: 240,
 height: 400,
 fps: 50,
 color: "#FFFFFF",
 opacity: 1.00,
 manifest: [
 {src:"images/tartmal.png?1526050296709", id:"tartmal"}
],
 preloads: []
};


you need to replace image and to insert instead "images/tartmal.png?1526050296709"

with the Converter, converted into a base64 format and the editor shows that it finds the image but the browser doesn't podgruzit (error in console: Failed to load).

as pravlno to replace the image?
June 5th 19 at 21:10
1 answer
June 5th 19 at 21:12
Solution
In the src attribute of the images should be something like src="data:image/png;base64,..."? then the picture will be displayed And what exactly is inserted into this attribute?
all it is inserted, the format is specified, all the brackets and quotation marks, too
browser fails to load the picture as I understand from what is written in the console

So where is the point - removed the part of code that not too many characters were

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADCcayaaaamw434aaaagxrfwhrtb2z0d2fyzqbbzg9izsbjbwfnzvjlywr5ccllpaaaa3hpvfh0we1momnvbs5hzg9izs54bxaaaaaaadw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5Uy3pryzlkij8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvymu6bnm6bwv0ys8iihg6eg1wdgs9ikfkb2jlifhnucbdb3jliduuni1jmtqwidc5lje2mdq1mswgmjaxny8wns8wn.......................Vr79Qx9gHHeOrgxeZP5xs8ST2zo7Jdv+43qcfuElGjx9Utzj64jr/39//Ni6HiWJ19VFA9u20uYbdrZUtVHvAQQExyjcajqjpmrhlterk0rrc08dpgw+L14EqYZULkt9rJDY7/jlK+xJXk0OXiMUcRxfF4vrj+uPOg/7+iW4/rj+uK4g1x/XH9cV5Prj+uO6glx/XH9cV5Drj+uP/zse/0eAAQCT8nkwR7QgSQAAAABJRU5ErkJggg==
- Gustave3 commented on June 5th 19 at 21:15
And the picture size is big? The length of the string around what?
qaru.site/questions/33082/what-is-the-size-limit-o... - william.Kuvalis commented on June 5th 19 at 21:18
the length of the line 88200 characters, picture - 64.6 KB
apparently deystvielno a very large image - Gustave3 commented on June 5th 19 at 21:21
all the code in the sandbox
tszhe with a reduced picture, but still not loads

on line 1101 code with base64, base64 code after the id ceases to light up.. (at the end of the line)
1100 what it was before (picture from the folder loaded) - Gustave3 commented on June 5th 19 at 21:24
This kind of problem in your library, because if you explicitly enter data from neocoregames pictures in src of img tag, the pie with raspberry visible
Symptoms turns out that data-uri somehow perceived as a normal uri, at this address there is a reference to the network and, obviously, it returns fail. You probably need to read the documentation for the library - createjs - william.Kuvalis commented on June 5th 19 at 21:27

Find more questions by tags JavaScript