fix: fix image overflow by restricting width to 100% of column

Image was overflowing onto the right sidebar. This was due to the width not being bounded, added max-width to fix this.
This commit is contained in:
AarDG10 2026-05-04 17:55:31 +05:30
parent 7f7da54eca
commit 668e78709f

View file

@ -10,9 +10,9 @@ frappe.ui.form.ControlImage = class ControlImage extends frappe.ui.form.Control
var doc = this.get_doc();
if (doc && this.df.options && doc[this.df.options]) {
this.$img = $(
"<img src='" + doc[this.df.options] + "' class='img-responsive'>"
).appendTo(this.$body);
this.$img = $("<img src='" + doc[this.df.options] + "' class='img-responsive'>")
.appendTo(this.$body)
.css({ "max-width": "100%" });
} else {
this.$buffer = $(
`<div class='missing-image'>${frappe.utils.icon("restriction", "md")}</div>`