diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index b4e03d97de5..79752d8f70b 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -630,12 +630,7 @@ class Web_Editor(http.Controller): if stream.type == 'url': return stream.get_response() - if stream.type == 'path': - with file_open(stream.path, 'rb') as file: - image = file.read() - else: - image = stream.data - + image = stream.read() img = binary_to_image(image) width, height = tuple(str(size) for size in img.size) root = etree.fromstring(svg)