Log in
Model

Storage

Magento\Cms\Model\Wysiwyg\Images\Storage

What it does

This class manages file and directory operations for the WYSIWYG editor's image storage in Magento 2.

Developers use it when implementing features that need to browse, upload, resize, or delete images in the CMS editor, such as creating custom media galleries or extending the WYSIWYG functionality.

It handles thumbnail generation, file validation, and enforces allowed directories and file types for security.

Public Methods

  • getDirsCollection()
  • getFilesCollection()
  • getCollection()
  • createDirectory()
  • deleteDirectory()
  • deleteFile()
  • uploadFile()
  • getThumbnailPath()
  • getThumbnailUrl()
  • resizeFile()
  • resizeOnTheFly()
  • getThumbsPath()
  • getSession()
  • getAllowedExtensions()
  • getThumbnailRoot()
  • isImage()
  • getResizeWidth()
  • getResizeHeight()
  • getCmsWysiwygImages()