I'm getting this strange error when I'm trying to upload an .jpg in the assets.

Env: Localhost
Craft version 3.1.8

- PHP(7.2.7)
- MySQL: 5.7.21

Upload failed. The error message was: "SQLSTATE[23000]: Integrity constant violation:

enter image description here

2 Answers 2


Does this only happen with this one particular image? If so, try renaming the image file to golden-pothos-2.jpg or something and then uploading again.


Do as Jon mentioned. This was a bug that will be fixed in the next release https://github.com/craftcms/cms/issues/3773

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.