LPS-34508 Won't reset the elcontent when there is no image in the structure
LPS-34508 Don't use String.isEmpty()
LPS-34508 Source formatting
LPS-34508 Reuse existing logic
LPS-34508 Source formatting