Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested: false Bug #13

Open
inetbiz opened this issue Oct 25, 2020 · 8 comments
Open

nested: false Bug #13

inetbiz opened this issue Oct 25, 2020 · 8 comments

Comments

@inetbiz
Copy link

inetbiz commented Oct 25, 2020

If if nested: false set to true, it still does not travel directories nested within the image folder.

webp:
  enabled: true
  
  # The quality of the webp conversion 0 to 100 (where 100 is least lossy)
  quality: 75

  # List of directories containing images to optimize, nested directories will only be checked if `nested` is true
  # By default the generator will search for a folder called `/img` under the site root and process all jpg, png and tiff image files found there.
  img_dir: ["/assets/images"]

  # Whether to search in nested directories or not
  nested: true

  # add ".gif" to the format list to generate webp for animated gifs as well
  formats: [".jpeg", ".jpg", ".png", ".tiff"]

  # File extensions for animated gif files 
  gifs: [".gif"]

  # Set to true to always regenerate existing webp files
  regenerate: true

  # Local path to the WebP utilities to use (relative or absolute)
  # Omit or leave as nil to use the utilities shipped with the gem, override only to use your local install
  webp_path: nil

  # List of files or directories to exclude
  # e.g. custom or hand generated webp conversion files
  exclude: []

  # append '.webp' to filename after original extension rather than replacing it.
  # Default transforms `image.png` to `image.webp`, while changing to true transforms `image.png` to `image.png.webp`
  append_ext: true
############################################################

@ghost
Copy link

ghost commented Nov 13, 2020

I can confirm this.
I just installed the plugin and experience the same bug.

@ghost
Copy link

ghost commented Nov 13, 2020

@inetbiz Try adding a slash to your image path. This solved it for me. It should be mentioned in the docs though...

@minamfg
Copy link

minamfg commented Jan 24, 2021

this happened to me too but after adding slash it worked

@BerkhanEminsoy
Copy link

@inetbiz Try adding a slash to your image path. This solved it for me. It should be mentioned in the docs though...

where are you adding this slash? img_dir? or to the actual directory path? Mine throws an error after appending a slash to the path.

@ghost
Copy link

ghost commented Dec 1, 2021

where are you adding this slash? img_dir? or to the actual directory path? Mine throws an error after appending a slash to the path.

img_dir

@BerkhanEminsoy
Copy link

I get 0 file(s) generated with img_dir w/o an appended slash and a build error w/ an appended slash. See repo. When I append a slash I get an invalid argument @ ..assets/img/C: somehow

@ghost
Copy link

ghost commented Dec 1, 2021

@BerkhanEminsoy Maybe the beginning of your img_dir is wrong. Here is the line in my _config.yml that works fine:
img_dir: ["/assets/img/"]

@BerkhanEminsoy
Copy link

@BerkhanEminsoy Maybe the beginning of your img_dir is wrong. Here is the line in my _config.yml that works fine: img_dir: ["/assets/img/"]

mine is exactly the same; img_dir: ["/assets/img/"] --> this throws an error. Though my images are actually located two directories under like so; assets/img/projects/project/.
And funny enough, dir projects doesn't show up in vs code autocomplete. Maybe it's because I have another folder with . in it under img dir? (like so; img/folder.ico/favicon) Though highly doubt that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants