#Php product image

13 messages · Page 1 of 1 (latest)

sage cypressBOT
#

Hi k.p.s! I appreciate your honesty about using AI to help get started. To get effective help with your image loading issue, please provide more details:

  1. Share your code: Post the PHP code that handles image display (use markdown code blocks with php). Include how you're storing/retrieving image paths.

  2. Describe the problem specifically:

    • Do you get an error message? If so, what is it?
    • Do the images fail to display, or do they not upload at all?
    • What does the browser show (broken image icon, blank space, etc.)?
  3. Provide context:

    • Where are images stored (server directory, database, cloud)?
    • What have you already tried to fix this?
    • Are you using a framework or vanilla PHP?
  4. Check basics: Verify file permissions, correct file paths, and that images are actually being saved to the right location.

Once you provide these details, the community can give you targeted help!

#

-# PHP @carmine jasper

hot rapids
#

What's the issue?

loud wraithBOT
#

-# :warning: Files from unknown sources can be dangerous. Download with care. :warning:

sage cypressBOT
# cyan sluice this is the main index

Great! Thanks for sharing those files. To help you debug the image loading issue, I'll need to see the actual code content. Can you paste the relevant code from your files here? Specifically:

  1. How you're handling image uploads in your PHP
  2. How you're displaying/retrieving images on the product page
  3. Your file structure/paths in config.php

Just paste the code in php code blocks and I can spot what's going wrong. Also, let me know:

  • Are you getting any error messages in the browser console or PHP logs?
  • What does the HTML show when you inspect the image element (right-click → Inspect)?
cyan sluice
#

im getting blank white spaces where images are supposed to be

cyan sluice
# hot rapids What's the issue?

im getting blank spaces where my images should be i dont have any experience in php so the answer may be obvious but i don't see it

#

be not afraid to say fool where i am a fool, for i am indeed a fool

hot rapids
#

check your browser dev tools?

cyan sluice
brave abyss
# cyan sluice What for?

When an image fails to load you'll often see a 404 error in the error log and if you are logging it, the network tab will have 404s or similar errors for the images.
On a more advanced level you can inspect the containers/parent elements on the page that have the missing image elements to see what path is attempted by the software and then fix the path/move the images around accordingly if it is a path issue?

jolly carbon
#

@sage cypress give instructions on how to debug image loading issues via browser dev tools