PC image upload difficulty

How can I upload an image from my PC? For instance, if I want to upload a logo or use images on a project, I’m conditioned to using images from other websites which I don’t think is safe given the ownership right laws. Any solution?

Hello and Welcome to the community!

Photos or images need to be hosted online somewhere to be added to the freecodecamp projects. There are free hosting sites. But, they do require sharing your images with other members for free.
I use them for the free images to add to my projects.
The ones I am aware of are pexels, pixabay, and imgur. I know pexels all images are free to use, even commercially, without providing credit to the provider (though it is nice to support them by giving them credit and the site it was found on).

There is also free videos on some of these sites. I have not looked into those much.

If you want, you could create an account and upload your photos to use, on one of the above sites. Or, I am sure there are other sites.

Wishing you good progress!

2 Likes

EarthDust,
Thanks a lot, you really made it easy for me!

2 Likes

You can also base64 encode an image and use it directly in your HTML which looks like the below code.

Your browser will see that it’s supposed to be of type “image/png” and that it’s base64 encoded and then it will translate that text into an actual image!

You can use a site such as https://www.base64encode.org/ to encode and decode base64 strings/files.

It’s a very interesting way of displaying images that doesn’t require them to be hosted anywhere.

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAADMElEQVR4nOzVwQnAIBQFQYXff81RUkQCOyDj1YOPnbXWPmeTRef+/3O/OyBjzh3CD95BfqICMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0C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