factorio-prints icon indicating copy to clipboard operation
factorio-prints copied to clipboard

Image tag in description not working

Open skellitor301 opened this issue 1 year ago • 6 comments

In the github markdown doc, there is a section to include images as an embedded object. However, when I try to use the markdown ![alt text](img url) or use html to embed an image the broken image icon appears in place of the image and the alt text is shown right next to it. It would be beneficial to include image embeds in the description to allow things like steps to use to include screenshots.

Here's a good example of this being used


Setup

  • You'll need to set up a space between your storage network and your crafters, requesters, cargo bay where you can put a line of these. In the example image below, I've set up my crafters going right and my storage going left.
    setting up space
  • Next, place the blueprint with the arrows pointing towards he crafters.
    placing blueprint

skellitor301 avatar Dec 26 '24 02:12 skellitor301

Are the embedded images in imgur?

FactorioBlueprints avatar Dec 28 '24 15:12 FactorioBlueprints

Yes, I've even tried changing the url to match what is required for the thumbnail. But no matter what I do it results in a broken image link.

The example provided above was directly copied from this attempt to make sure the url matches right. It shows up here on Github but it doesn't on Factorio Prints:

### Setup
- You'll need to set up a space between your storage network and your crafters, requesters, cargo bay where you can put a line of these. In the example image below, I've set up my crafters going right and my storage going left.\
![setting up space](https://imgur.com/em82YeX.png)
- Next, place the blueprint with the arrows pointing towards he crafters.\
![placing blueprint](https://imgur.com/PdSOeqg.png) 

I will add that I did notice while playing with it here on Github that the image will break if the file extension isn't included. The only thing I've seen to work on FP is hyperlinking, but adding the ! in front of it to make it an image embed breaks the image link with or without the extension.

skellitor301 avatar Dec 31 '24 20:12 skellitor301

I think it's related to imgur specifically. Images elsewhere embed without issue.

motlin avatar Jan 01 '25 16:01 motlin

If that were the case then they would not embed here. But I manage to get the image tag to work on Github, while on the site the same tag doesn't work. You can see for yourself that the initial post embedded the images, those are uploaded to Imgur. The embed markdown used I directly copied and pasted from the original post here to Factorio Prints to triple check since I saw it worked here and it does not work on Factorioprints.

skellitor301 avatar Jan 05 '25 04:01 skellitor301

Yes I see the behavior that you're describing but I'm not sure what the fix is or if it's possible to fix. Imgur links embedded elsewhere seem to work. Images to elsewhere seem to work when embedded in factorioprints. Other embeds to imgur also work from factorioprints, when including the noreferrer wrapper. Maybe it would be possible to configure the markdown renderer to create noreferrer wrappers. I could use help with this one.

FactorioBlueprints avatar Jan 05 '25 20:01 FactorioBlueprints

I wish I could help, but I don't have the coding experience to give a definitive answer. Maybe the community board on Github could provide insight?

skellitor301 avatar Jan 09 '25 17:01 skellitor301