Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: image not being rendered in approach.mdx in uli-website #363

Merged
merged 2 commits into from
Sep 10, 2023

Conversation

aatmanvaidya
Copy link
Collaborator

@aatmanvaidya aatmanvaidya commented Sep 10, 2023

An image is not being rendered in a blog in uli-webiste.
The blog is titled Thinking about Feminist Approaches to Technology and mdx file can be found inside uli-website/src/pages/blog/approach.mdx.

In this mdx file earlier, Tarunima was rendering the image like this

<Box width={'100%'} height={'fit-content'}>
  <Image alignSelf={'start'} fill={true} fit="contain" src={"https://github.com/tattle-made/website/blob/master/static/products/OGBV_stakeholders_2.png"} />
</Box>

In my view, the image is not being rendered because a GitHub link to the image is attached in the image src. This won't work because the image is not hosted on a CDN.

Thats why I added the OGBV_stakeholders_2.png image to the static folder. And then I am trying to display the image in the blog like this

![OGBV Stakeholders](OGBV_stakeholders_2.png)

This still does not show the image and just the alt text can be seen -> OGBV Stakeholders.
I also tried displaying the image using HTML code like this

<img src="OGBV_stakeholders_2.png" alt="OGBV Stakeholders" />

This as well, isn't showing the image and just the alt text can be seen.

I also removed my .chache folder and re-ran the development server.

@dennyabrain if possible, whenever you get time, can you pull this at your end and test it out? what am I doing wrong?

@ghost
Copy link

ghost commented Sep 10, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@dennyabrain
Copy link
Contributor

Replace OGBV_stakeholders_2.png with /OGBV_stakeholders_2.png. When in doubt about hosting of static assets, always try visiting the url in the browser. So in this case it will be at http://localhost:8000/OGBV_stakeholders_2.png. See if thats working and then atleast you will know whether the issue is with the static asset not being served by the server or some issue with rendering the image on the webpage.

@aatmanvaidya
Copy link
Collaborator Author

@dennyabrain, that fixed it, thank you for the help!
this PR can now be merged!

@dennyabrain dennyabrain merged commit e2e3177 into tattle-made:main Sep 10, 2023
2 checks passed
@aatmanvaidya aatmanvaidya deleted the blog-uli-web-fix branch September 11, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants