mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 16:35:07 +01:00
fix issue with loading base64 images #2978
This commit is contained in:
parent
0da9821e90
commit
05e57dea66
4 changed files with 15 additions and 6 deletions
|
|
@ -102,9 +102,16 @@ export default class SlideContent {
|
|||
|
||||
// Images
|
||||
if( backgroundImage ) {
|
||||
backgroundContent.style.backgroundImage = backgroundImage.split( ',' ).map( background => {
|
||||
return `url(${encodeURI(background.trim())})`;
|
||||
}).join( ',' );
|
||||
// base64
|
||||
if( /^data:/.test( backgroundImage.trim() ) ) {
|
||||
backgroundContent.style.backgroundImage = `url(${backgroundImage.trim()})`;
|
||||
}
|
||||
// URL(s)
|
||||
else {
|
||||
backgroundContent.style.backgroundImage = backgroundImage.split( ',' ).map( background => {
|
||||
return `url(${encodeURI(background.trim())})`;
|
||||
}).join( ',' );
|
||||
}
|
||||
}
|
||||
// Videos
|
||||
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue