sylvainjule / kirby-colorextractor

Extract dominant / average color from any image. Kirby 3 and 4.
39 stars 7 forks source link

When uploading an svg file to the panel #5

Closed flokuek closed 5 years ago

flokuek commented 5 years ago

When uploading a svg file to the panel it throws an error: imagecreatefromstring(): Data is not in a recognized format

same with a png file: file_get_contents(http://localhost/peak/media/site/-772678704-1544528814/capture-1x0-q90.png): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

These issues come up since I've updated to the latest v3 nightly build 2018-12-10

blueprint setup:

sections:
  images:
    type: files
    layout: list
    template: image
    info: "{{ file.dimensions }}"

error error

sylvainjule commented 5 years ago

The svg issue is fixed, the plugin will now only process resizable files. ✅

Your png issue should also be fixed, the extraction process now relies on the root() instead of url() of the thumb, and forces its creations so it always exists when the path is accessed. Don't hesitate to open a new issue with more details about the context if it happens again!

flokuek commented 5 years ago

Awesome 😄