Struct Docs
Struct.PIM v3
Struct.PIM v3
  • Struct PIM Documentation
  • API Reference
  • Changelog
  • Latest updates from Struct HQ
  • Latest updates in Documentation
  • Fundamental concepts
    • Get familiar with Struct PIM
    • Catalogues & categories
    • Products & variants
    • Attributes
    • Product structures
    • Identifiers
    • Global lists
    • Collections
    • Security management
    • Localization & segmentation
    • Revisions & changelog
    • Dashboard
    • Publications
    • Supplier onboarding portal
  • Tutorials
    • Helpful guides
      • How to use product models
      • How to use product catalogues
      • How to use enrichment insights
      • How to use Import
        • How to import products
        • How to import data into a list property on entities
        • How to import categories
        • How to import with media
        • How to use File mappings
        • How to use Validation rules during import
        • How to use Transformation during import
      • How to use Business rules
        • How to set up and edit a business rule
        • How to use conditions in a business rule
        • How to set up business rules to trigger other business rules
        • How to automatically set release status
        • How to automatically calculate the size of a variant
        • How to automate price conversion
        • How to assign documents to a product when it is created
        • How to manage product identifiers
    • Example projects
      • Working with the API
      • Product viewer
      • Publications 3.15
  • Integration
    • Integrate with Struct PIM
    • Web API
    • Webhooks
    • Media format
  • Reference
    • How to use Struct PIM
    • Search
      • Manage columns
      • Bulk actions
      • Search help
    • Tasks
      • Task details
    • Global lists
      • Global list details
    • Product catalogues
      • Product catalogue details
        • General settings
        • Data model
          • Tab types
            • Tab details
          • Section types
            • Section details
          • Property types
            • Property details
        • Workflow
        • Display settings
        • Identifiers
          • Identifier details
    • Collections
    • Background tasks
    • Publications
      • Prints
        • Print details
      • Templates
        • Edit template
          • Template settings details
          • Template design
            • Header/Footer elements
            • Template preview settings
    • Product model setup
      • Product structures
        • Product structure details
          • General settings
          • Data model
            • Tab types
              • Tab details
            • Section types
              • Section details
            • Property types
              • Property details
          • Variation definitions
            • Variation definition details
          • Product wizards
          • Variant group create wizard
          • Variant create wizard
          • Display settings
          • Identifiers
            • Identifier details
      • Attributes
        • Attribute details
          • Data type details
      • Attribute groups
        • Attribute group details
      • Attribute scopes
      • Dimensions
        • Dimension details
      • Enrichment Insights
        • Enrichment insight details
        • Insights setup
          • Insight details
      • Business rules
        • Business rule details
          • Triggers
            • Trigger details
              • Trigger configuration details
          • Conditions
            • Condition details
              • Condition configuration details
          • Actions
            • Action details
              • Action configuration details
      • Changelog
      • Workflows
        • Workflow details
        • Workflow states
          • Workflow state details
          • Workflow transitions
            • Workflow transition details
    • Settings
      • API configuration
        • API configuration details
          • API configuration basic settings
          • API configuration advanced settings
      • Webhooks
        • Webhook details
          • Webhook advanced details
      • Messaging
        • Messaging details
      • Security
        • User settings
        • User group permissions
      • Setup
        • General
        • Supplier portal email
        • Supplier portal
        • Archive reasons
        • Scheduled tasks
        • Attribute indexing
        • User settings
      • Permission Management
        • Permissions
        • Permission Groups
      • Languages
      • Maintenance
      • License
      • Extensions
        • Extensions details
        • URL details
      • File mappings
        • File Mapping details
      • AI assistant
        • Translation
        • Text generation
    • Dashboard
      • Saved searches
        • Saved searches details
      • Dashboard tabs
      • Widget details
        • Widget types
Powered by GitBook
On this page
  • Supported query parameters
  • Examples
  1. Integration

Media format

Struct PIM supports formatting media directly through its media module based on querystring parameters.

PreviousWebhooksNextHow to use Struct PIM

Last updated 1 month ago

The media module delivering assets provides methods to perform various manipulation functions on a given image or file based on querystring parameters.

Supported query parameters

Parameter
Description

width

For mode Pad passing just one dimension will automatically preserve the aspect ratio of the original image.

For mode BoxPad when upscaling an image the image pixels themselves are not resized, rather the image is padded to fit the given dimensions. If downscaling it will behave the same as Pad.

height

For mode Pad passing just one dimension will automatically preserve the aspect ratio of the original image.

For mode BoxPad when upscaling an image the image pixels themselves are not resized, rather the image is padded to fit the given dimensions. If downscaling it will behave the same as Pad.

format

Converts current asset to a new image format.

Supported image formats: jpg, png, webp, gif

Supported file to image formats: pdf, psd, eps

mode

The following modes are supported:

  • Pad Passing a single dimension will automatically preserve the aspect ratio of the original image. If the requested aspect ratio is different then the image will be padded to fit. Widths and heights can optionally also be passed as a ratio This is default.

  • BoxPad When upscaling an image the image pixels themselves are not resized, rather the image is padded to fit the given dimensions. When downscaling the image is resized using the rules defined by Pad

  • Crop Resizes the image to the given dimensions. If the set dimensions do not match the aspect ratio of the original image then the output is cropped to match the new aspect ratio.

quality

Alters the output quality of the current image. This method will only effect the

output quality of images that allow lossy processing.

anchor

Anchor positions supported:

  • center

  • top

  • right

  • bottom

  • left

  • topleft

  • topright

  • bottomleft

  • bottomright

Center is default.

bgcolor

When padding applied and or image includes transparency, it is possible to set the color of the padding/baggrund.

Examples

?width=100
?height=10
?format=webp
&mode=boxpad
&quality=90
&mode=crop&anchor=top
&bgcolor=ffffff
Original
?width=250
?width=550&height=550&mode=crop&anchor=left
?width=1100&height=1100&mode=boxpad&bgcolor=lightblue