Integration on Mobile app

This documentation explains which Accept Headers needs to be included for Images in Mobile App. This allows you to optimize images specifically for Nitrogen AIO delivery.

Prerequisites#

  • You must have a domain configured on Nitrogen
  • You must have AIO enabled, please refer this article .
  • Basic understanding of Mobile App Image Properties and Nitrogen AIO.

Steps#

Add the following mandatory Headers on outgoing image requests. Please modify the values based on the user’s mobile device and network configuration:

X-Device-Dpr = 1
X-Device-Format = image/avif,image/webp,image/jpeg,image/png
X-Device-Ram = 4096
X-Device-Width = 980
X-Device-Bandwidth = 10
X-Device-Type = app

Description:

  • X-Device-Dpr: Specifies the screen’s device pixel ratio to serve the right image quality.
  • X-Device-Bandwidth: Indicates the device’s current internet speed in megabytes per second (Mbps).
  • X-Device-Width: Tells the server the ideal image width of the device screen (in pixels).
  • X-Device-Ram: Shares how much available RAM the device has (in MBs).
  • X-Device-Format: Specifies the image formats supported and available on the device for optimized delivery, such as webp or avif.
  • X-Device-Type: Identifies if the request is coming from a mobile app by using the value “app”.