Files
.dependabot
.github
cypress
dev-test
img
packages
scripts
website
content
blog
docs
widgets
boolean.md
date.md
datetime.md
file.md
hidden.md
image.md
list.md
map.md
markdown.md
number.md
object.md
relation.md
select.md
string.md
text.md
add-to-your-site.md
architecture.md
authentication-backends.md
beta-features.md
cloudinary.md
collection-types.md
configuration-options.md
contributor-guide.md
custom-widgets.md
customization.md
deploy-preview-links.md
examples.md
gatsby.md
hugo.md
intro.md
jekyll.md
middleman.md
netlify-large-media.md
nextjs.md
nuxt.md
open-authoring.md
start-with-a-template.md
update-the-cms-version.md
uploadcare.md
widgets.md
writing-style-guide.md
pages
.keep
data
src
static
.babelrc
.gitignore
.nvmrc
.stylelintrc
README.md
gatsby-browser.js
gatsby-config.js
gatsby-node.js
netlify.toml
package.json
postcss.config.js
yarn.lock
.all-contributorsrc
.editorconfig
.eslintrc
.gitignore
.nvmrc
.prettierignore
.prettierrc
.stylelintrc
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
babel.config.js
custom-preprocessor.js
cypress.json
jest.config.js
lerna.json
netlify.toml
package.json
renovate.json
setupTestFramework.js
yarn.lock
static-cms/website/content/docs/widgets/image.md
2018-12-04 17:04:52 -05:00

1.1 KiB

label title
Image image

The image widget allows editors to upload an image or select an existing one from the media library. The path to the image file will be saved to the field as a string.

  • Name: image
  • UI: file picker button opens media gallery allowing image files (jpg, jpeg, webp, gif, png, bmp, tiff, svg) only; displays selected image thumbnail
  • Data type: file path string
  • Options:
    • default: accepts a file path string; defaults to null
    • media_library: media library settings to apply when a media library is opened by the current widget
      • allow_multiple: (default: true) when set to false, prevents multiple selection for any media library extension, but must be supported by the extension in use
      • config: a configuration object that will be passed directly to the media library being used - available options are determined by the library
  • Example:
    - label: "Featured Image"
      name: "thumbnail"
      widget: "image"
      default: "/uploads/chocolate-dogecoin.jpg"
      media_library:
        config:
          multiple: true