diff --git a/conf.py b/conf.py
index 08d828695..96970c883 100644
--- a/conf.py
+++ b/conf.py
@@ -51,6 +51,10 @@ exclude_patterns = [
# See https://docutils.sourceforge.io/docs/ref/rst/roles.html#standard-roles for other roles.
default_role = 'literal'
+
+# Whether scaled down images should be be wrapped in a `` tag linking to the image file or not.
+html_scaled_image_link = False
+
# If true, '()' will be appended to :func: etc. cross-reference text
add_function_parentheses = True
diff --git a/extensions/odoo_theme/static/js/layout.js b/extensions/odoo_theme/static/js/layout.js
index 8f995a515..d82cd0097 100644
--- a/extensions/odoo_theme/static/js/layout.js
+++ b/extensions/odoo_theme/static/js/layout.js
@@ -3,9 +3,29 @@
document.addEventListener('DOMContentLoaded', function () {
const content = document.getElementById('o_content');
- // Enforce the presence of the `img-fluid` class on all images in the body.
+ let imageModalId = 0;
content.querySelectorAll('img').forEach(image => {
+ // Enforce the presence of the `img-fluid` class on all images.
image.classList.add('img-fluid');
+
+ // Add a modal to each image.
+ const modalContainer = document.createElement('div');
+ modalContainer.classList.add('o_image_modal');
+ modalContainer.innerHTML = `