About this task
Images that are larger than the specified container size are resized. For example, if the specified maximum size is 100x100 and a user uploads a 10x10 image, its size will not change. But if the user uploads a 150x150 image, it will be resized to 100x100.
The thumbnail image sizes set for media galleries must not be larger than the "large" image size set in the files-config.xml configuration properties file. Media galleries use Files properties to display images, and are constrained by Files image size values. As long as media gallery sizes are smaller than the largest Files size setting, the media gallery widget will scale its images down to that size. Therefore, if Files has a preview generation size of 100x100 as the largest possible, and the media gallery setting is 450x450, we will not scale the 100x100 up to 450x450. Instead, we will display it as 100x100.
However, if a media gallery size value is larger than the available Files rendition size values, then the media gallery will use a Files size value. This will crop the outer edges of the images.
For information on Files rendition values, see Files configuration properties
You can change three maximum size properties:
- The thumbnailview properties set maximum image sizes in the community overview page widget, and the list view in the application. The recommended range is 50x50 to 78x78.
- The detailview properties set maximum image sizes in the preview dialog (which opens you click an image in a list view, for example), and the summary page (which opens when you click the image name in a list, for example). The recommended range is 200x200 to 600x600.
- The galleryview properties set maximum image size in the gallery view in the application. The recommended range is 80x80 to 180x180.
For example, to change the maximum image size in the preview dialog and summary page to 500x500, change the detailview
width and height properties from 450 to 500.
To configure photo sizes in the media gallery, Check out the media-gallery-config.xml
file, edit configuration properties, and then check the file back in.
Size values outside of the recommended range for thumbnailview
, and detailview
are not supported.
- Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
is the WebSphere
® Application Server installation directory and dm_profile_root
is the Deployment Manager profile directory, typically dmgr01.
You must start the client from this directory or subsequent commands that you enter do not execute correctly.
- Use the wsadmin client to access and check out the configuration file:
- Enter the following command to access the IBM Connections configuration files: execfile("connectionsConfig.py")
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored. This information is not used by the wsadmin client when you are making configuration changes.
- Enter the following command to check out the media-gallery-config.xml configuration file:
- working_directory is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories in the file path, even if you are using the Microsoft Windows operating system.
AIX and Linux only: The directory must grant write permissions or the command does not run successfully.
- cell_name is the name of the WebSphere Application Server cell hosting the IBM Connections application. This argument is case-sensitive, so type it with care. If you do not know the cell name, type the following command while in the wsadmin command processor:print AdminControl.getCell()
- AIX or Linux:LCConfigService.checkOutMediaGalleryConfig("/opt/temp","foo01Cell01")
- Microsoft Windows:LCConfigService.checkOutMediaGalleryConfig("c:/temp","foo01Cell01")
- Open the media-gallery-config.xml file in a text editor.
- Edit the width and height values as measured in pixels:
<thumbnailView width="73" height="73"/>
<galleryView width="120" height="120"/>
<detailView width="450" height="450"/>
- Save the media-gallery-config.xml file in UTF-8 format.
- Update the value of the version stamp to force users' browsers to pick up this change. See Required post-customization step for more details.
- To check in the changed media-gallery-config.xml file, use the following command:
- After making updates, type the following command to deploy the changes:
- To exit the wsadmin client, type exit at the prompt.
- Stop and restart all of the IBM Connections application servers.
What to do next
To troubleshoot, enable tracing for: com.ibm.lconn.media.renditions.* See the IBM WebSphere
Application Server documentation.
Parent topic: Configuring media galleries