GoogleChromeLabs / houdini.how

A community-driven gathering place for CSS Houdini worklets and resources.
https://houdini.how
Apache License 2.0
152 stars 39 forks source link

All the avatars in a secure place #67

Closed nucliweb closed 3 years ago

nucliweb commented 3 years ago

Is possible that in the future we have problems with some avatar, in all the Twitter pictures for example if the users change them.

Solutions

developit commented 3 years ago

Ideally these could just go in public/images, which would allow the images to be optimized and load from the same domain (best for performance). I realized today WMR doesn't automatically copy assets over to dist/images when building, which I'll get fixed up shortly.

For now though, it could be done manually via package.json scripts:

  "scripts": {
-   "build": "npm run -s worklets && npm run -s resources && wmr build --prerender",
+   "build": "npm run -s worklets && npm run -s resources && npm run -s assets && wmr build --prerender",
+   "assets": "cp -rf public/assets dist/",
     …
  }
nucliweb commented 3 years ago

Great, I will take a review to move all the avatars to assets folder.

Thanks @developit