How to view and construct an adaptive media URL for a document
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- You might have some trouble in figuring out how the URL for
Resolution
Guide through an exact example:
- The URL pattern you should use looks like this:
/o/adaptive-media/image/id/Thumbnail-300x300/url.png?t=
- Upload an image to Documents and Media
- Open the image and check the latest version URL, for example:
http://localhost:8080/documents/20124/0/5.jpg/418bf1a9-47b5-5b78-9782-1ed48de714d8?t=1681903801009
- Check the DB and get the
fileEntryId of the image which in this case: 35150
- From this two information, you can create the following URL:
http://localhost:8080/o/adaptive-media/image/35150/Thumbnail-300x300/url.png?t=1681903801009
- As you can see, you replace the
id from the URL pattern with 35150 and place the ?t=1681903801009 parameter to the end, the same as in the end of the latest version URL
Did this article resolve your issue ?