Image Handling

The use of images as a visual representation of information is crucial in many software applications. Our SDK provides the tools and functionality needed to easily handle images. In this section, we will introduce you to image handling in Social Plus, including how to upload and retrieve images in the SDK.

Note: The maximum image file size limits are up to 1 GB per post.

Image Data

Property
Description

fileId

Identifier for the uploaded file

fileUrl

The HTTP web URL for the uploaded file. You can use this fileUrl for downloading the image file.

attributes

Contains a dictionary with values for name, extension, size & mimeType

of uploaded image

metadata

Contains additional metadata dictionary related to uploaded image such as height, width, isFullImage etc.

altText

Contains descriptive text which conveys the meaning and context of an image

Upload Images

To upload an image to the system, you can use the Social Plus Image Upload API provided by the SDK. The API allows you to upload an image to the Social Plus server/ The SDK simplifies the process of uploading images by providing pre-built components that you can easily integrate into your application. Additionally, you can add alt text to your images to support accessibility, ensuring that your application is more inclusive for all users.

Supported image formats are JPG, PNG and cannot exceed 1GB in size.

Retrieve Images

You can retrieve an image from Social Plus using the Social Plus Image Retrieval API provided by the SDK. The API enables you to retrieve an image from the Social Plus server by supplying the image URL. Once an image is uploaded to the server, the image will be automatically transformed into four different sizes for versatile usage. We provided an option to retrieve a specific image size which are:

  • Small: is used for image thumbnails, with a maximum image size of 160 pixels per dimension. For example, this should be used for small previews in an image gallery that displays a large number of images in a grid.

  • Medium: is used for standard image display, with a maximum image size of 600 pixels per dimension.

  • Large: is used for full-screen image display, with a maximum image size of 1500 pixels per dimension.

Update Images Alt text

To enhance accessibility of your images, you can modify the alt text using the Update Image API. This value can be served to screen readers to provide meaningful descriptions of your images to visually impaired users.

Here's how to update an image's alt text:

Last updated

Was this helpful?