1

Good morning,

I have inherited a Craft CMS site from a previous developer, and am running into issues when looking to add images to the site.

Following instructions I grabbed the copy of the SQL database for local use, and am running MySQL and Apache via XAMPP

I added new images to the local file structure (assets/images/) but when I go to the template being used and add the standard <img src="./assets/images/name"> I get an error in the console of 404 http://localhost:3000/assets/images/image.jpg could not be found. I then tried adding it directly into the same folder with my template code (just to see if I can get it working) but this time I got a 500 server error.

I am completely at a loss now since I never worked with CMS before (am an internal React/Node developer). I hope I explained the issue clearly, would anyone be able to point me in the correct direction?

Many thanks.

3
  • So, you're not trying to fetch the images using Twig but manually entering the URLs? When you look at the page source and click on the URL of your image, does it exist in that location? – Clive Portman Jul 15 '20 at 8:51
  • Is there an asset volume setup if you go to Settings > assets > volumes? – dmatthams Jul 15 '20 at 9:02
  • 1
    500 errors are very generic. I'd check your error log. If Craft handled the request, there also should be a matching error inside storage/logs/web.log. Could be permissions, could be something else completely. My guess is your web root in XAMPP isn't set right? Can you get to the backend at all? – RitterKnight Jul 15 '20 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.