Skip to main content
Image posts combine one or more uploaded images with an optional text caption. Upload the images first, then pass the uploaded image objects or file IDs to the post creation API.
This page focuses on the SDK call that creates the post. See Image Handling for upload steps, supported file inputs, and upload constraints.

Uploaded Images

Create posts from image objects or file IDs returned by the file upload flow.

Caption Support

Add text, metadata, mentions, or other SDK-supported post fields alongside the images.

Parameters

Product tags (SDK API). An image post has a text parent and an image child. productTags tags products mentioned in the parent text. attachmentProductTags tags products on the child media attachment, and is not an array: it is an AmityAttachmentProductTags container that maps each attachment’s fileId to that attachment’s media tags. Flutter does not expose product tags on any post builder. See Tag Products below for both. UIKit’s product-tag UI is a separate surface and may support fewer post types; see UIKit Product Tagging. For tagging limits and tap-through behavior, see Product Tagging.

Create an Image Post

The examples below create an image post in a community. Replace the target with the SDK’s user-feed target when posting to a user.

Tag Products

TypeScript, Android, and iOS accept two separate product inputs when creating an image post. The text tag is applied to the parent; the attachment tag is applied to the image child. Build attachmentProductTags by setting the tags for each uploaded image’s fileId. Images you do not set tags for stay untagged.

Notes

  • TypeScript accepts image attachments as { type: "image", fileId }.
  • Android accepts a Set<AmityImage>.
  • iOS accepts [AmityImageData].
  • Flutter accepts List<AmityImage>.
For mixed attachment types, use Mixed Media Posts.

Image Handling

Upload images before creating image posts.

Mixed Media Posts

Combine images with other supported media attachments.

Posts Overview

Review post concepts, retrieval, and moderation flows.