• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
10

Generate Image Assets -> Webp

Community Beginner ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

Photoshop now has webp image support, which is great, but it does not work when generating image assets using the File->Generate->Image Assets workflow. Presently, it just gives an error with 'Unsupported extension: webp".

 

Considering Adobe is advertising 'full support' for webp in photoshop, this seems like an oversight.

 

Please roll the webp functionality into the generate image assets workflow.

 

Why is it valuable to me:

WebP files are particularly useful for web development. The generate image assets workflow is also very web-dev friendly. I would be using this combo constantly if it were possible. Instead I have to slowly export-as my way around multiple documents. The current situation feels like stepping back in time.

 

Idea No status
TOPICS
Actions and scripting , macOS , Windows

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
17 Comments
Participant ,
Nov 16, 2022 Nov 16, 2022

Copy link to clipboard

Copied

If you make a small change in this file

C:\Program Files\Adobe\Adobe Photoshop 2022\Required\Plug-ins\Generator\game_assets.generate\lib\parsermanager.js

 

you can make it work.

Change 
"webp": !!this._config["webp-enabled"]

 

to

"webp": this._config.hasOwnProperty("webp-enabled") ? !!this._config["webp-enabled"] : true,


BUT if you move to Photoshop 2023 that's different now... And I have no idea how to solve the problem this time, so I'm going to open a new post asking that :S

Votes

Translate

Translate

Report

Report
Community Beginner ,
Aug 30, 2023 Aug 30, 2023

Copy link to clipboard

Copied

Hi all, any update on this request for webp support using generate?


Votes

Translate

Translate

Report

Report
Explorer ,
Sep 25, 2023 Sep 25, 2023

Copy link to clipboard

Copied

Using PS 2024 on Windows it works for me now. Just needed to enable it within the Configuration Options.
https://github.com/adobe-photoshop/generator-assets/wiki/Configuration-Options#sample-configuration

Votes

Translate

Translate

Report

Report
Community Beginner ,
Sep 26, 2023 Sep 26, 2023

Copy link to clipboard

Copied

Thanks for the heads up, I'm using Mac and M1 and Generator config panel is noted to not be supported. Is there other ways to enable it?

Votes

Translate

Translate

Report

Report
Explorer ,
Sep 26, 2023 Sep 26, 2023

Copy link to clipboard

Copied

* Create a new txt file, copy this in there, save and close it:
module.exports = {
"generator-assets": {
"webp-enabled":true,
"webp-lossless":false,
}}

* rename your .txt file to generator.js
* save your generator.js file at this location and restart PS:

Windows     C:\Users\<UserName>
Mac            /Users/<UserName>/

Votes

Translate

Translate

Report

Report
Community Beginner ,
Sep 27, 2023 Sep 27, 2023

Copy link to clipboard

Copied

Amazing thanks mate, just tested and this is working perfectly. I was also able to add percentage value to optimise the WebP compression amount.

Votes

Translate

Translate

Report

Report
New Here ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

hello Paul, I'm also using Photoshop 2024 on an M1 Macbook. Did you copy the generator.js file to this directory  /Users/<UserName>/ (or some folder inside the Adobe photoshop??)

This doesn't seem to work for me. After restart, I'm still seeing the error.txt saying unsupported extension. 

Votes

Translate

Translate

Report

Report
New Here ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

hello kv, I followed the step by saving the .js file under  /Users/<UserName>/ (M1 Mac user here). However, after restarting PS, I still have the error for generation (unsupported extension). Is it because the direction is wrong? 

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

Anecdotally, it appears to be an issue for Apple Silicon chips.

Votes

Translate

Translate

Report

Report
Community Beginner ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

Hi

I'm using an M1 Pro, and this has been working for me since my last post. We have tested this on several systems, and all we needed to do was configure a txt file with the supplied code, call it generator.js, and move it to your username folder in your /Users/ directory.

 

With a Photoshop restart, you should be able to add the webp extension to your layer to output a webp files. If your having further issues maybe share what code you have in your js file and a screen of your layers in photoshop if we can identify any error you may have.

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

@paulsoultis 

 

Thanks for confirming that this works with an M1 chipset!

 

I also recently shared some configuration files here:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/generate-image-assets-from-layers-los...

 

EDIT: A new alternative option for creating the generator.js configuration file here –

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/online-quot-generator-quot-config-fil...

Votes

Translate

Translate

Report

Report
New Here ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

hey @Stephen_A_Marsh @paulsoultis I have attached the screenshot of the js file content, directory, and the settings of my psd artboard. Seems like all settings are done, but I still encounted error after restart photoshop (even after reboot the mac). Did I miss anything? Thanks a lot!

jsfile.pngpsdfile.png

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

@Sam22616526i6hc 

 

Where is WEBP?

 

"webp-enabled": true,

 

config.png

Votes

Translate

Translate

Report

Report
New Here ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

aha! also realised that the line of comment was not meant to be copied, which cause syntax error.

it works perfect now. thank you all

Votes

Translate

Translate

Report

Report
Community Beginner ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

Nice find @Stephen_A_Marsh.

Glad it's working for you now @Sam22616526i6hc  

Votes

Translate

Translate

Report

Report
Community Beginner ,
Dec 04, 2024 Dec 04, 2024

Copy link to clipboard

Copied

Hello! I have a quick question, I have been using the same workflow –to generate a lot of web oriented assets, daily– and I was wondering if there is any way to incorporate the Colour profile of the .psd file into the webp generated assets.
I know it's possible with the other formats (jpeg/png/etc.) But I am not sure aboute the webp, another code line could help ?
Thank you 🙂

 

 

Votes

Translate

Translate

Report

Report
Community Expert ,
Dec 04, 2024 Dec 04, 2024

Copy link to clipboard

Copied

LATEST
quote

Hello! I have a quick question, I have been using the same workflow –to generate a lot of web oriented assets, daily– and I was wondering if there is any way to incorporate the Colour profile of the .psd file into the webp generated assets.
I know it's possible with the other formats (jpeg/png/etc.) But I am not sure aboute the webp, another code line could help ?
Thank you 🙂

 


By @Ernesto_CH 

 

I just tested in v2021 and can confirm that the ICC profile isn't included in WebP as it is in other formats when the generator.js configuration file is set to "embed-icc-profile": true,

Votes

Translate

Translate

Report

Report