Limit Images' Size and Type

Limit Images' Size

The default image size is 5M, you can modify it yourself.

editor.config.uploadImgMaxSize = 2 * 1024 * 1024 // 2M

Limit Images' type

You can push the accepted types in uploadImgAccept array.

editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp']

The default accepted types are:

['jpg', 'jpeg', 'png', 'gif', 'bmp']

If you want the types to be unlimited, you can set an empty array.

editor.config.uploadImgAccept = []
Copyright © wangEditor (2020 - present) all right reserved,powered by GitbookFile Modify: 2021-07-04 12:51:04

results matching ""

    No results matching ""