Enabling Access to Static Image Renditions in DAM

Whenever you go to the Renditions page for an image that was converted using the Digital Asset Management conversion from the Inbound Refinery, you have the chance to download those particular images by clicking on the rendition name.

static_renditions.jpg
If you hover your mouse over one of those links, you'll notice the URL is pointing to a dynamic service call in UCM which calls the GET_FILE service and defines the rendition to get (e.g. http://server/idc/idcplg?IdcService=GET_FILE&dDocName=ECM5_001407&dID=2754&RevisionSelectionMethod=specific&Rendition=Preview&allowInterrupt=1).

What's happening under the hood in regards to the storage of those renditions is a bit different then with other content items. While the Web and Thumbnail images are stored within the weblayout structure normally, those extra renditions are actually stored together in a .zip file. If you look within the weblayout directory, they are stored with the naming convention of "<content id>@z~<revision>.zip". So when you click on the link for that rendition, the server is actually extracting that particular file out of the zip before sending it out. On an infrequent image-by-image basis, that process works fine. But if try and serve these images on a more frequent basis, that can begin to put a strain on the system to deliver those files.

But there is a way to allow those images to also be available statically so that the server doesn't have to extract them with each request. The current ZipRenditionManagement component (version 2009_05_04 (Build 45)) now has the ability to place particular image rendition files in their own sub directories for static delivery. There are four methods offered to create and access those renditions.


  • You can set the configuration variable 'RenditionListExportedForStaticAccess' which would identify the list of renditions to offer statically. This is a pipe delimited list which also supports wildcards.


    'RenditionListExportedForStaticAccess=Preview|General*

     
    Now when images are checked in, that static version will immediately become available in the weblayout structure.
     

  • You can call the service CREATE_STATIC_RENDITION and pass it the dDocName (Content ID) and Rendition name .


    http://server/idc/idcplg?IdcService=CREATE_STATIC_RENDITION&dDocName=ECM5_001407&Rendition=Preview

     
  • The Idoc Script function docGetRenditionPath(rendition [, dDocName]) will return the static URL to the image if it is available (such as having been created on check-in using the first method). If not, it will return the GET_FILE URL instead. If you have the dDocName available as part of a DOC_INFO resultset, you don't need to specify it.



    <$docGetRenditionPath("Preview","ECM5_001407")$>

     

  • The Idoc Script function docCreateRenditionPath(rendition [, dDocName]) which works like the previous function. But if the static rendition has not already been created, this will create it at that moment and return the static URL. So this will always guarantee a static URL.



    <$docCreateRenditionPath("Preview","ECM5_001407")$>

     

For more information on these instructions, be sure to look at the readme.txt (and not readme.html) file contained within the ZipRenditionManagement component.

Given this capability, the next logical question is if these static renditions are available through Site Studio. From an access perspective, absolutely. These static renditions are part of the weblayout path and are accessible like any other image or checked in asset. So if you had a dynamic list of images, you could use the above methods to point to those particular renditions.

But as far as selecting a particular image rendition in the Contribution Editor, that is still coming. Right now in the latest DigitalAssetManager component, it will display Select buttons next to each rendition on the Renditions page. But they currently only point to the Web rendition URL. This is currently being looked into and hopefully resolved in the next Site Studio patch.

Comments:

Hi Kyle Are there any updates on when selecting a particluar Image rendition from the WYSIWYG editor will be possible? Is there a way to customize the Image selector to be able to pick a specific rendition type like thumbnail (instead of web) Thanks Sid

Posted by Sid Mulpuru on July 20, 2010 at 08:50 AM CDT #

Hey Sid, Unfortunately, there has not been any additional patches to the DigitalAssetManager component for 10g, so it still only the weblayout URL is used. But yes, you can certainly override the behavior built into the DigitalAssetManager to change the link returned. In looking at this in UCM 11g, it looks like it has been resolved there.

Posted by kyle.hatlestad on July 22, 2010 at 02:24 AM CDT #

hi Kyle, was there an update on this, pls. I need to access the static renditions directly from the weblayout directory.

Posted by ramesh on November 02, 2010 at 03:45 AM CDT #

Hello Ramesh, For 10gR4, I've checked the latest Site Studio patch (#7007799 - build 8.0.0.626), but it still appears to only grab the web rendition. But this functionality has been incorporated in the 11g release. Thanks, -Kyle

Posted by kyle.hatlestad on November 03, 2010 at 01:20 AM CDT #

Hi Kyle, I am using the ImageMagick for image conversion and I have followed the same step which you defined in the LOLCats. I have defined the rendition set in the extraRenditionDefinition.hda. I am able to convert the image into different formats and different sizes. But while displaying the Dimension & Resolution is not displayed on the Rendition information page. Please suggest where I went wrong. Thanks Sumaiyya

Posted by Sumaiyya on November 08, 2010 at 08:17 PM CST #

Hey Sumaiyya, Yes, DAM has a dependency on Image Alchemy to provide the image information such as dimension and resolution. So if ImageMagick is your only image converter, you'll just get the images themselves. mikeyc7m wrote an interesting blog article on how you can use the demo version of Image Alchemy to get the image information you need while using another tool, like ImageMagick, to generate the images. Thanks, -Kyle

Posted by kyle.hatlestad on November 09, 2010 at 12:52 AM CST #

Hey Kyle, I've observed that when the rendition or content item is invalid, the docCreateRenditionUrl() not only fails, it destroys all fragment output. I'll raise a ticket with Oracle support but I thought I'd mention it to you too. Also it sucks that it creates static urls for each revision, it would be great if it could create just one unchanging url to the latest revision. Cheers

Posted by mikey on December 02, 2010 at 10:38 AM CST #

Hi Kyle,

I have set up oracle ucm and ibr at my system,it is working fine and I am able to get all the default renditions(Basic/Thumbnail/Multiple).

I pasted 'RenditionListExportedForStaticAccess=Preview' in the config.cfg file of oracle content server as well as IBR.My ucm version is 11.3.I am using a oracle db xe 11g.But when I use the following url -

http://localhost:16200/cs/idcplg?IdcService=CREATE_STATIC_RENDITION&dDocName=ANANDA000203&Rendition=Preview,

I am getting the following error.

Content Server Request Failed

Configuration error for request 'CREATE_STATIC_RENDITION'.No dynamic HTML page.

Posted by royinkol on August 26, 2011 at 12:57 AM CDT #

Hey royinkol,

If you added the configuration flag for RenditionListExportedForStaticAccess,
then that is all you should need in order to create the static version of that rendition. The CREATE_STATIC_RENDITION service is an alternate way of CREATING the rendition, not accessing it. And that service was designed to be called programatically and not necessarily through a direct URL, so that's why there is no resulting HTML page to display. If you added '&IsJava=1' to the end of that URL, it should take you to the hda version of the page where you can see StatusMessage with the result of that service, which should hopefully be success.

If you look in you weblayout directory, are you seeing this extra ~extract directory and rendition there? That will really tell you if the service is really working. And then you can either access that static version through it's full weblayout URL (http://server/cs/groups/public/documents/digitalmedia/~extract/UCM000123~1~staticrendition/preview.gif) or by using one of the Idoc functions mentioned above.

Thanks,
-Kyle

Posted by Kyle Hatlestad on August 29, 2011 at 06:23 AM CDT #

Thanks Kyle,
Everything is working as you suggested. :-)

Posted by royinkol on September 01, 2011 at 02:06 AM CDT #

Using the Basic Rendition set:
Native
Web
Preview
Thumbnail

even after your update config.cfg only thumbnail and preview are created.
It ignores web rendition which unfortunately is the one I need for an image gallery in webcenter.

I check if they exist by browsing the weblayout ~extract dir and checking what files get created.

SO far I tried
Web
Web*

Posted by Guillaume on January 10, 2012 at 02:51 PM CST #

Hey Guillaume,

Web is actually the one that ALWAYS is stored statically. It's the one referenced by the Web Location on the Content Information page (e.g. http://server:16200/cs/groups/public/documents/graphic/ecm_091235.jpg)

Thanks,
-Kyle

Posted by Kyle Hatlestad on January 13, 2012 at 08:24 AM CST #

Hi Kyle,

We have lot of PDF documents. When we didn't have IBR enabled, the document used to be released quickly like in couple of seconds.We upgraded to 11g and we needed the Thumbnails (to be used by external applications) of the documents. So, we enabled the IBR. But it takes more than 10 minutes for the document to go to the released status. Is there a way to make the document available right away and also make the Thumbnail available so that we can easily access it by external applications?

BTW, in 11g, where do I set the RenditionListExportedForStaticAccess=PreviewGeneral config property?

Thanks for your help!

Posted by guest on January 27, 2012 at 02:22 PM CST #

Hi Kyle, Thanks for posting this. I have a strange issue... if I paste

<img src="<!--$docCreateRenditionPath("Thumbnail","MY_TEST")-->" />
<img src="<!--$docGetRenditionPath("Thumbnail","MY_TEST")-->" />

In one of my HSCP templates, before the </body>, I see rendition image on the page and in src code. However, if I try to move those two lines inside a SearchResults loop, the content server reports:

"Unable to generate HTML page. The error was caused by an internally generated issue. The error has been logged."

Is there a reason this code cannot work inside a loop of SearchResults?

Posted by Bryan on January 30, 2012 at 01:51 PM CST #

@IBR issues

If it's taking 10 minutes to release a PDF that had a thumbnail generated through IBR, that is not normal behavior. It should be very fast (less then 30 seconds) to generate the thumbnail and release the document. So this would indicate something else is holding up the release. Support should be able to help increase the speed of release.

Thanks,
-Kyle

Posted by Kyle Hatlestad on February 07, 2012 at 05:10 AM CST #

Hi Kyle,

Could you please specify how I would retrieve a VIDEO rendition using the GET_FILE service please?

e.g.
The following will allow me to get the NATIVE video file using the get file service and the Primary rendition:
https://server.com/cs/IdcService=GET_FILE&dID=2418&dDocName=QUTMW_002210&RevisionSelectionMethod=specific&Rendition=Primary&allowInterrupt=1

However if I try and retrieve one of the video renditons created by the flip factory/DAM component such as the MP4,WMV or FLV renditions I recieve an error:
https://server.com/cs/idcplg?IdcService=GET_FILE&dID=2418&dDocName=QUTMW_002210&RevisionSelectionMethod=specific&Rendition=FLV&allowInterrupt=1

Error:
Content Server Request Failed
Unable to download 'QUTMW_002210'. The rendition or attachment 'FLV' could not be found in the list manifest of the revision with internal revision ID '2418'.

Do I need to access DAM/Flip Factory converted videos via a different service or is there another clause that needs to be added?

Thank you.

Regards
Ravi

Posted by guest on May 15, 2012 at 10:01 PM CDT #

In case anyone is interested, you cannot loop through a set of images and use either of these functions UNLESS each item in the resultset has an accessible rendition. You can check dRendition2 for a value of Z before trying to access the rendition.

Posted by Bryan Paepke on May 29, 2012 at 09:21 AM CDT #

Hey Ravi,

Great question! Looks like you need to pass in an extra parameter. 'AuxRenditionType=media'. Just learned that myself. I wrote this up in its own blog post: https://blogs.oracle.com/kyle/entry/downloading_specific_video_renditions_in

Thanks,
-Kyle

Posted by Kyle Hatlestad on June 12, 2012 at 04:45 PM CDT #

Hi Kile, we have a huge database of already cheked in images, and it seems that UCM is not unzipping them. Do you know how could we force the extraction of all the image zips? I think it could work out if we extract them with archiver and import them back, but we have a lot of images and I'm not sure if we should try...

Posted by guest on October 11, 2012 at 04:54 AM CDT #

I'm not sure I understand what you mean by UCM is not unzipping them. Are you not able to get a particular rendition file to be returned? That sounds more like an issue with the DAM module and you should consult technical support to get that working. Once you can get them extracted and placed statically like defined here, I think the easiest way to get static renditions from older revisions would be to get a list of the Content IDs (dDocName) and then run the CREATE_STATIC_RENDITION service in a URL or API on each one. You could even use a automated testing tool like JMeter to do it.

Thanks,
-Kyle

Posted by Kyle Hatlestad on October 11, 2012 at 08:44 AM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today