File tree 2 files changed +1
-13
lines changed
addons/html_editor/static/src
2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ export class ImagePostProcessPlugin extends Plugin {
17
17
static id = "imagePostProcess" ;
18
18
static dependencies = [ "style" ] ;
19
19
static shared = [ "processImage" ] ;
20
- resources = {
21
- system_attributes : [ "data-bg-src" ] ,
22
- } ;
23
20
24
21
/**
25
22
* Applies data-attributes modifications to an img tag and returns a dataURL
Original file line number Diff line number Diff line change @@ -97,16 +97,7 @@ export function getImageSrc(el) {
97
97
if ( el . tagName === "IMG" ) {
98
98
return el . getAttribute ( "src" ) ;
99
99
}
100
- if ( el . dataset . bgSrc && el . style . backgroundImage . includes ( el . dataset . bgSrc ) ) {
101
- return el . dataset . bgSrc ;
102
- }
103
- const url = backgroundImageCssToParts ( getComputedStyle ( el ) [ "background-image" ] ) . url ;
104
- // Cache the this value as getComputedStyle can eat performance
105
- if ( url ) {
106
- el . dataset . bgSrc = url ;
107
- } else {
108
- delete el . dataset . bgSrc ;
109
- }
100
+ const url = backgroundImageCssToParts ( el . style . backgroundImage ) . url ;
110
101
return url && getBgImageURLFromURL ( url ) ;
111
102
}
112
103
You can’t perform that action at this time.
0 commit comments