Skip to content

Archive Trac docs image video input types

madscatt edited this page Jun 20, 2026 · 1 revision

Docs Image Video Input Types

Legacy Trac archive page imported from docs_image_video_input_types. Source: https://genapp.rocks/wiki/wiki/docs_image_video_input_types. Review age, links, and examples before treating as current.

Images

  • Images should be placed into the "add" sub-directory under the project directory
  • create one if it does not already exist
  • you can also created a subdirectory or subdirectories under add, but if so, you will need to add the path to your image "name"
  • N.B. Formats for images that are accepted by major browsers include png, gif & bmp.
  • .json template is the following:
                 {
                   "role"       : "input",
                   "id"         : "imageid",
		   "name"       : "ImageName.jpg",  
                   "type"       : "image",
		   "label"      : "Image",
		   "alt"        : "Some Alternative Text",
# colspan, height, width are optional, but specifying a too small colspan (column span) will effect the layout of columns in the input fields
		   "colspan"    :  5,  
		   "width"      : 300,
		   "height"     : 250  
                 }, 

Video

  • Video files should be placed into the "add" sub-directory under the project directory
  • create one if it does not already exist
  • you can also created a subdirectory or subdirectories under add, but if so, you will need to add the path to your video "name"
  • N.B. for videos, you need to create both a .webm and .mp4 (h264 encoded) to support the major browsers
  • .json template
                {
                   "role"       : "input",
                   "id"         : "videoid",
		   "name"       : "Video_file_basename",  
                   "type"       : "video",
		   "label"      : "Video",
# colspan, height, width are optional, but specifying a too small colspan (column span) will effect the layout of columns in the input fields
		   "colspan"    :  5,  
		   "width"      : 300,
		   "height"     : 250   
                }

Width and height are in pixels. For the video, two formats should be supplied, .mp4 and .webm. Note, only file basename must be provided in .json module (no extension)

Clone this wiki locally