statamic / spock

Automatically perform git commits, pushes, and other cli actions when Statamic content changes
95 stars 16 forks source link

Spock does not commit image presets #20

Closed bgarrant closed 5 years ago

bgarrant commented 6 years ago

Spock has been working great but I noticed when an image is created with a front end form like Workshop, the image presets do not auto-commit with Spock. This could also be happening in the CP as well, but I have not tested that. For example, I uploaded an image on a Workshop form and this what is committed:

 2 files changed, 7 insertions(+)
 create mode 100755 public_html/assets/images/events/test.jpg
 create mode 100755 site/content/collections/events/2018-08-14.test-event.md

but when I try a git pull to local I get this error:

On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        public_html/img/containers/main/images/events/test.jpg/

nothing added to commit but untracked files present (use "git add" to track)

You can see the issue.

This is my assets.yaml

image_manipulation_route: /img
image_manipulation_secure: true
auto_crop: true
image_manipulation_driver: gd
image_manipulation_cached: true
image_manipulation_cached_path: public_html/img
image_manipulation_presets:
  header:
    w: 1920
    h: 1080
  body:
    w: 1200
    h: 500
  cards:
    w: 800
    h: 500
  seo:
    w: 1200
    h: 630
  logo:
    w: 375
  modal:
    w: 1500
thumbnail_max_width: 6000
thumbnail_max_height: 6000
jasonvarga commented 6 years ago

Thanks! We'll sort that out for a future release of Statamic.

jasonvarga commented 6 years ago

Also, you might want to just gitignore the generated images.

bgarrant commented 6 years ago

That will work for now. I will ignore the img folder which should solve that. Probably a good thing to ignore on all sites. Thanks.

bgarrant commented 6 years ago

That is where my presets are stored.