Compress image uploading size

Support Meta Box AIO Compress image uploading size

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29686
    LULU
    Participant

    Hi

    I use the following code to upload image.
    Are there anyway to compress the file size and change the directory?
    Or any hook to use to do these work?

                    [
                        'name' => __('Item Image', ''),
                        'id' => $prefix . 'meta_items_image',
                        'desc' => __('Only JPG,PNG,GIF', ''),
                        'type' => 'image',
                        'max_file_uploads' => 3,
                        'class' => 'item-image',
                    ],
    #29690
    Long NguyenLong Nguyen
    Moderator

    Hi,

    To compress the image uploaded, you can use a third-party plugin such as Smush https://wordpress.org/plugins/wp-smushit/

    There is only the field file that supports uploading files to the custom folder. Please get more details on the documentation https://docs.metabox.io/fields/file/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.