TruptMan-Solutions's avatar

Adding image in laracast discussion description not working

I tried to add image to my conversation using img tag , attribute src containing link of imgur doesn't work for me.

even after following this official rules guide to post discussion on form. laracast-forum-guide

0 likes
3 replies
LaryAI's avatar
Level 58

To add an image to your Laracasts discussion description using an <img> tag, you need to ensure that the image URL is correct and that the HTML syntax is properly formatted. Here is a step-by-step guide to help you:

  1. Upload your image to a reliable image hosting service (like Imgur, as you mentioned).
  2. Copy the direct link to the image. This link should end with the image file extension (e.g., .jpg, .png, etc.).
  3. Use the correct HTML syntax to embed the image in your discussion.

Here is an example of how you can do it:

<p>Here is an image I want to share:</p>
<img src="https://i.imgur.com/your-image-id.jpg" alt="Description of the image">

Make sure to replace https://i.imgur.com/your-image-id.jpg with the actual direct link to your image.

Example:

If your image URL is https://i.imgur.com/example.jpg, your HTML should look like this:

<p>Here is an image I want to share:</p>
<img src="https://i.imgur.com/example.jpg" alt="Description of the image">

Troubleshooting Tips:

  1. Check the URL: Ensure that the URL you are using is a direct link to the image and not a page containing the image.
  2. Correct Syntax: Make sure your HTML syntax is correct and that there are no typos.
  3. Image Accessibility: Ensure that the image is publicly accessible and not restricted by any privacy settings.

If you follow these steps and still encounter issues, it might be worth checking if there are any specific restrictions or guidelines on the Laracasts forum regarding embedding images. You can refer to the Laracasts Forum Guide for more details.

I hope this helps! If you have any further questions, feel free to ask.

s4muel's avatar
s4muel
Best Answer
Level 50

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images

You can display an image by adding ! and wrapping the alt text in [ ]. Alt text is a short text equivalent of the information in the image. Then, wrap the link for the image in parentheses ().

![Screenshot of a comment on a GitHub issue showing an image, added in the Markdown, of an Octocat smiling and raising a tentacle.](https://myoctocat.com/assets/images/base-octocat.svg)

working example:

![coffee!](https://fastly.picsum.photos/id/1060/536/354.jpg?blur=2&hmac=0zJLs1ar00sBbW5Ahd_4zA6pgZqCVavwuHToO6VtcYY "Coffee")

coffee!

1 like

Please or to participate in this conversation.