File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed
addons/html_editor/static/src Expand file tree Collapse file tree 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 {
1717 static id = "imagePostProcess" ;
1818 static dependencies = [ "style" ] ;
1919 static shared = [ "processImage" ] ;
20- resources = {
21- system_attributes : [ "data-bg-src" ] ,
22- } ;
2320
2421 /**
2522 * 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) {
9797 if ( el . tagName === "IMG" ) {
9898 return el . getAttribute ( "src" ) ;
9999 }
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 ;
110101 return url && getBgImageURLFromURL ( url ) ;
111102}
112103
You can’t perform that action at this time.
0 commit comments