diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index b768540f55e..a50828fd0a9 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -228,7 +228,7 @@ class Web_Editor(http.Controller): # Find attachment by url. There can be multiple matches because of default # snippet images referencing the same image in /static/, so we limit to 1 attachment = request.env['ir.attachment'].search([ - ('url', '=like', src), + '|', ('url', '=like', src), ('url', '=like', '%s?%%' % src), ('mimetype', 'in', SUPPORTED_IMAGE_MIMETYPES), ], limit=1) if not attachment: