SnailyCAD / snaily-cadv4

💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U
https://docs.snailycad.org/docs/getting-started
MIT License
137 stars 83 forks source link

Citizen Images Not Loading #1927

Closed MarshyMelloow closed 1 month ago

MarshyMelloow commented 2 months ago

What version of Node.js are you using?

18.20.2

What operating system are you using?

Ubuntu 22.04

What version of SnailyCAD are you currently using?

1.79.1

Describe the Bug

When loading a citizens profile that has a image uploaded the image never loads. The following appears in the browser console: "Failed to load resource: the server responded with a status of 400 (Bad Request)" image When Following the link: image ""url" parameter is not allowed"

We also get the following in the SnailyCAD Console:

image ⚠ The "images.domains" configuration is deprecated. Please use "images.remotePatterns" configuration instead.

Expected Behavior

There should be no errors and images should load

Example: image

To Reproduce

Spin up a fresh install of SnailyCAD, and try to upload a picture.

mitch-cl commented 2 months ago

just missing documentation more than anything. If you are using a domain to host the webstite, you need to modify the next config in /apps/client/next.config.mjs, and add your domain name to images.domains image

MarshyMelloow commented 2 months ago

Thank You! I will make sure to add this to the documentation.

WhitigolProd commented 1 month ago

Resolved in https://github.com/SnailyCAD/snaily-cadv4/commit/25ffdb8123cbbc974e1579af3156c88378e43694

Please check the new format (images.remotePatterns) in apps/client/next.config.mjs