# Large webp file loading

**URL:** <https://forum.opencv.org/t/large-webp-file-loading/11498>\
**Category:** C++\
**Tags:** imgcodecs\
**Created:** [January 5, 2023, 2:31am UTC](https://forum.opencv.org/t/large-webp-file-loading/11498 "2023-01-05T02:31:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilyrxj](https://avatars.discourse-cdn.com/v4/letter/l/8c91f0/32.png) [@lilyrxj](https://forum.opencv.org/u/lilyrxj)\
**Post date:** [January 5, 2023, 2:31am UTC](https://forum.opencv.org/t/large-webp-file-loading/11498/1 "2023-01-05T02:31:40Z")

</div>

I am loading a webp file in C++. it showed that my webp file is too large.

> File is too large. Increase OPENCV\_IMGCODECS\_WEBP\_MAX\_FILE\_SIZE parameter if you want to process large files (expected: ‘fs\_size \<= param\_maxFileSize’), where  
> ‘fs\_size’ is 81092200  
> must be less than or equal to  
> ‘param\_maxFileSize’ is 67108864

How can I address this?

Thank you!

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [January 5, 2023, 5:40am UTC](https://forum.opencv.org/t/large-webp-file-loading/11498/2 "2023-01-05T05:40:07Z")

</div>

> [@lilyrxj](#):
>
> Increase OPENCV\_IMGCODECS\_WEBP\_MAX\_FILE\_SIZE parameter

it’s an environment variable.

---

<div class="post-metadata">

**Author:** ![lilyrxj](https://avatars.discourse-cdn.com/v4/letter/l/8c91f0/32.png) [@lilyrxj](https://forum.opencv.org/u/lilyrxj)\
**Post date:** [January 5, 2023, 6:09am UTC](https://forum.opencv.org/t/large-webp-file-loading/11498/3 "2023-01-05T06:09:16Z")

</div>

It worked. Thank you very much!

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 5, 2023, 8:21am UTC](https://forum.opencv.org/t/large-webp-file-loading/11498/4 "2023-01-05T08:21:20Z")

</div>

take a look, _why_ it is there:

> <https://github.com/opencv/opencv/blob/9208dcb07c015e1fda44e40bb07b43c700b4bf46/modules/imgcodecs/src/grfmt_webp.cpp#L62>
