Skip to content
Advertisement

tweetImage not showing an image

Here is my line 51,

Here is my code.

When I execute it I GET THIS
When i replace ‘tweetImage’ with ‘profileImage’in line 51.My profileImage successfully gets uploaded in place of blank thumbnail.I want the tweetImage uploaded by the user to be uploaded in place of the blank thumbnail.I can’t seem to figure out much as i am one week new to PHP.

Here is my “home.php”,It is my main page and profileImage and tweetImage are defined here.

THIS IS WHAT I TRIED:

  1. Removed base url before tweet image ; like this '.$tweet->tweetImage.' OR <img src="'.$tweet->tweetImage.'" class="imagePopup"/>
  2. Tried “Inspect element on the blank image thumbnail” to find the error at line 51.
  3. I tried searching for similar question on stackoverflow but wasn’t able to find one.

    EDIT:
    YOU CAN LOOK AT THIS TO FIND SOMETHING HELPFUL

Any suggestion , remark, answer would be appreciated!

Advertisement

Answer

In your db table, the tweets.tweetImage column is a datetime. All of the rows are empty except for the last one which is a time stamp.

Change it to the file path or uri and it should work after that.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement