Legacy Knowledge Base
Published Jul. 2, 2025

Extra HTML tag in the Source Code in Web Content Articles

Written By

Justin Choi

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

This article documents a known issue and also a workaround in the Adaptive Media functionality. Liferay DXP 7.1 uses Adaptative Media to manage thumbnails and previews. It was discovered that after applying Liferay DXP 7.1 Fix Pack 1, a &imagePreview=1 tag appears at the tail end of the source code in embedded images in Web Content Articles. This is actually intended. However, the issue is that there is a missing Adaptive Media configuration that was supposed to generate the preview images when this parameter is utilized. But once the correct Adaptive Media configuration are applied, using the parameter results in fetching the correct image and everything displays as it should.

Steps to Reproduce:

  1. Navigate to the Control Panel → Content → Documents and Media.
  2. Add a new image to be embedded in the Web Content article.
  3. Navigate to the Control Panel → Content → Web Content.
  4. Click Add → New → Basic Web Content. A special structure or template is not necessary to reproduce this error.
  5. Enter the following:
    • Title: Ha Long Bay
    • Content: A dozen or so tour boats moored outside the grotto, Ha Long Bay
    • Click the (+) button to add an image.
    • Select the image from the Documents and Media tab.
    • Click the Code View to view the HTML source code.

    adaptive-media-html-tags03.png

 

The reason for this error is because when applying the latest fix packs, the Adaptive Media functionality did not upgrade existing previews.

Resolution

Workaround Available

One workaround is to create a new Adaptive Media Image Resolution rule then use it to upgrade all the preview thumbnails.
To do so:

  1. Go to the Control Panel → Configuration → Adaptive Media.
  2. Click the plus icon to add a new Image Resolution rule.
  3. Enter the following:
    • Name: Preview 1000x0
    • Max Width: 1000
    • Max Height: 0
  4. Leave the rest of the options as is
  5. Click Save.
  6. Click on the 3-dot menu next to Preview 1000x0 and click Adapt Remaining to convert the currently stored images to have this new resolution.
    adaptive-media-html-tags04.png

When completed, Preview 1000x0 shows 100% complete. The extraneous HTML tag at the end of the file can be safely ignored.
adaptive-media-html-tags05.png

Additional Information

For more information on the ultimate resolution, see LPS-86356 and LPS-82009.

Did this article resolve your issue ?

Legacy Knowledge Base