-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use base 64 token for loading images in Lightbox #11
Comments
|
@themyth92 is there any way i can covert base64 image to Url ? |
Hi, can you just define base64 data in your src. For example:
|
I am doing same. but it wont load images. even light box doesn't open. no error in console. heres the code for each gallery in result heres my open method. lightbox wont open. dont know whats happening |
for (let i = 1; i <= 4; i++) { const src = 'demo/img/image' + i + '.jpg'; } how do i assign index to the base 64 images |
Hi, what is the value in your this.galleries[albumb]['Attachments'] = [
{
src: 'data:image/gif;base64...'
},
{
src: 'data:image/gif;base64...'
}
] It seems like you have another properties, e.g |
@themyth92 i have other attributes also in |
I think you should change your implementations to for each gallery in result:
result[gallery]['Attachments']['src'] = "data:" + filemime + ";base64," + file; // notice the removal of `attachment` attributes
// ...
this._lightbox.open(this.galleries[albumb]['Attachments'], image); |
@themyth92 i have similar implementation..each gallery has many attachments and for each attachment i do this |
Hmm, that's seem correct. Also on the second parameter is the index of the image right ?
|
Yes. its the index of image. |
You mind post the result of |
@themyth92 https://ibb.co/eWyENa see this image for this object |
@themyth92 check this url now https://ibb.co/eWyENa |
Hi, can you just change |
And also can you check on your <thumb (click)="open(i)></thumb>
|
https://ibb.co/gm2zNa see html @themyth92 |
If you change your src image some google images with url, is it work or not ? |
image modal not working for google images also. no error in console. |
@themyth92 it shows thumbnails for this. but no modal for images |
Hi, i am not sure what is going on on your side so I create a new branch from my webpack demo. Can you see what's the difference here compare to your work. The file you need to check is at demo/app.component.ts (notice the variables You can clone on your end and run Tks. |
Closed, feel free to open if you have any problems ! |
for (let i = 1; i <= 4; i++) {
const src = 'demo/img/image' + i + '.jpg';
const caption = 'Image ' + i + ' caption here';
const thumb = 'demo/img/image' + i + '-thumb.jpg';
const album = {
src: src,
caption: caption,
thumb: thumb
};
this method is appending index at the end of file name. how can i use base 64 src for images?
The text was updated successfully, but these errors were encountered: