Skip to content

[fix] load images in Part 1 / Lifecycle / onMount excercise #174

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

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

ivanbtrujillo
Copy link
Contributor

This PR is about to fix the images for the Part 1 / Lifecycle / onMount excercise

While doing the tutorial, I noticed the images were not loading due to an error of type:

GET https://via.placeholder.com/150/61d552 net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200

By adding:

crossorigin="anonymous"

To the images, they appear as expected.

I've added the attribute to the initial and the solved state, and removed the warning from the Readme.

Without the attribute:
image

With the attribute:
image

@vercel
Copy link

vercel bot commented Dec 30, 2022

@ivanbtrujillo is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@ivanbtrujillo ivanbtrujillo changed the title FIX: Load images in Part 1 / Lifecycle / onMount excercise [fix] Load images in Part 1 / Lifecycle / onMount excercise Dec 30, 2022
@ivanbtrujillo ivanbtrujillo changed the title [fix] Load images in Part 1 / Lifecycle / onMount excercise [fix] load images in Part 1 / Lifecycle / onMount excercise Dec 30, 2022
Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

@dummdidumm dummdidumm merged commit bf99fd6 into sveltejs:main Jan 23, 2023
@Rich-Harris
Copy link
Member

I'm afraid this still doesn't work for me — I think we need to revert it so that the message is still present.

I'm curious as to how you're seeing those images though — is that in dev, or preview? Or is it working for you in production on https://learn.svelte.dev/tutorial/onmount? If so, in which browser(s)?

Rich-Harris added a commit that referenced this pull request Jan 23, 2023
dummdidumm pushed a commit that referenced this pull request Jan 23, 2023
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.

3 participants