Merge pull request #39083 from AarDG10/fix-img-css

fix: fix image overflow by restricting width to 100% of column
This commit is contained in:
Aarol D'Souza 2026-05-05 10:30:54 +05:30 committed by GitHub
commit cbd6d59cf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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>`