why can't img2webp read a folder of PNGs?

743 views
Skip to first unread message

bach99

unread,
Oct 25, 2018, 1:06:08 PM10/25/18
to WebP Discussion
What arguments do I use if I have a folder of PNGs and want to convert them to webp? Thanks. 

James Zern

unread,
Oct 25, 2018, 1:32:26 PM10/25/18
to WebP Discussion
Hi,


On Thursday, October 25, 2018 at 10:06:08 AM UTC-7, bach99 wrote:
What arguments do I use if I have a folder of PNGs and want to convert them to webp? Thanks. 

The bug linked in another thread [1] contains a shell option which should work. You can use a batch or shell script depending on your environment. Given this has come up a few times over the years maybe we could add a FAQ entry and something to our README.

James Zern

unread,
Oct 26, 2018, 2:27:07 AM10/26/18
to WebP Discussion


On Thursday, October 25, 2018 at 10:32:26 AM UTC-7, James Zern wrote:
Hi,

On Thursday, October 25, 2018 at 10:06:08 AM UTC-7, bach99 wrote:
What arguments do I use if I have a folder of PNGs and want to convert them to webp? Thanks. 

The bug linked in another thread [1] contains a shell option which should work. You can use a batch or shell script depending on your environment. Given this has come up a few times over the years maybe we could add a FAQ entry and something to our README.

feni...@gmail.com

unread,
Apr 30, 2020, 5:21:51 PM4/30/20
to WebP Discussion
Could you provide the example of use all *.png from folder by img2webp.exe (on windows), please?

James Zern

unread,
May 1, 2020, 1:18:08 PM5/1/20
to WebP Discussion
Hi,

On Thu, Apr 30, 2020 at 2:21 PM <feni...@gmail.com> wrote:
>
> Could you provide the example of use all *.png from folder by img2webp.exe (on windows), please?
>

One option would be to list all the files in a text file. img2webp
will read commands from a file if it's the only argument given on the
command line. Something like this should work:
dir /b *.png >args.txt & echo -o output.webp >> args.txt & img2webp.exe args.txt
> --
> You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
> To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/60fdb9ee-dbbd-4caa-8c97-50fe49247778%40webmproject.org.
Reply all
Reply to author
Forward
0 new messages