ANS-0190 · SAVED SEARCHES & FORMULAS

How to Resize an Image in NetSuite Saved Search Results?

Display and resize custom images directly within NetSuite saved search results using a Formula (HTML) field.

Short answer

To resize an image in a NetSuite saved search, use a Formula (HTML) column. Construct an <img> tag, concatenating the custom image field's value into the src attribute. Specify width and height attributes directly within the HTML formula to control the image dimensions displayed in the search results.

Scenario

Users often need to display product or item images directly within NetSuite saved search results. The challenge arises when these images need to be presented at a specific, smaller size to fit within the search layout without distorting the overall view. This requires embedding HTML for image display and resizing.

Solution

To display and resize an image within a NetSuite saved search, create a new custom column in the search results. This column should be of type Formula (HTML) to ensure proper rendering of HTML content. Within this formula field, construct an tag, incorporating the custom image field's value into the src attribute. Note that the exact method for generating a publicly accessible image URL from a custom image field may vary depending on specific NetSuite configurations and how the image field is populated. The width and height attributes can then be used to define the desired display dimensions. The formula structure is as follows:

'<img src"'||{custitem_custom_altimage1}||'" width"25" height"25" alt"Component">'

In this example, {custitem_custom_altimage1} represents the internal ID of a custom field configured as an 'Image' type. Adjust the width and height values as needed for your specific display requirements.

Expert NetSuite Support

Need help with this NetSuite issue?

Saved Searches & Formulas consulting and configuration support

Talk to a consultant