How to upload .webp file in CodeIgniter

I want to upload webp images using PHP CI Framework, Can anyone help how to upload .webp instead of jpg?


  • Add webp MIME Type in config file: ./application/config/mimes.php.
    'webp' => array('image/webp'),

    And in your upload config "allowed_types" add "webp" :
    $config['allowed_types'] = 'gif|jpg|jpeg|png|webp';

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!