Flower Docs
  • OpenFlower overview
    • The "Hello World" tutorial
  • Videos
    • OpenFlower in 100 seconds
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Access local database or API
      • Google Cloud Platform
      • Heroku
      • Migration from Openblocks
      • Update MongoDB Versions
      • OpenFlower Version Update
      • Traefik loadbalancer
      • SMTP Server
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • OpenFlower Marketplace
  • ✨Build Applications
    • Create a new App
      • Modules
      • Version and Release Management
    • App Editor
      • Visual Components
        • Common Component Settings
        • File upload
        • Charts and graphs
        • Image
        • Option lists
        • List View
        • Drawer
        • Google Maps
        • Table
        • Messages / Toast
        • Calendar
      • Date handling
      • Bulk Editing
      • Layers
      • Data selection & Javascript
      • Use Markdown
      • Keyboard shortcuts
    • App Navigation
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
  • 🚀Connect your Data
    • Data source basics
    • Data sources in OpenFlower
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embedd an App
      • Embed Apps in React
      • Native embed SDK
        • Build the SDK from Source
  • 🔥OpenFlower Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • OpenFlower Open REST API
Powered by GitBook
On this page
  • URL
  • Base64 encoded data
  • Demo: upload and display an image
  • Set click preview for an image
  • Set the style of an image
  1. Build Applications
  2. App Editor
  3. Visual Components

Image

Use the Image component to present information in your apps in a vivic way. OpenFlower supports you adding an image via URL and base64 encoded data.

URL

Drag the Image component onto the canvas or into a Container. Click the Image component, and the Properties tab is displayed on the right. You can set the URL to display an image.

Base64 encoded data

You can also insert an image via base64 encoded data. Ensure that the encoded image source starts with data:image/PICTURE_FORMAT;base64, or simplydata:image;base64,.

Don't miss the comma at the end of the prefix:

data:image/PICTURE_FORMAT;base64,YOUR_BASE64_ENCODED_IMAGE_DATA

data:image;base64,YOUR_BASE64_ENCODED_IMAGE_DATA

Demo: upload and display an image

One common use case for base64 image display would be combining a File Upload component with an Image component.

Here is JS code that concatenates the prefix with the encoded base64 data of the uploaded file via file1.value[0].

{{"data:image/jpeg;base64," + file1.value[0]}} 

Set click preview for an image

Toggle Support click preview in the Properties tab to allow users to preview the image in its full size. Hover your mouse over the image, and you see 👁 Preview. Then, you can click to preview.

Set the style of an image

In Properties > Style, change border color and set Border radius in pixels or by percentage.

PreviousCharts and graphsNextOption lists

Last updated 7 months ago

✨