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

Option to add an image to the background #5

Open
christopherkade opened this issue Jun 1, 2019 · 6 comments
Open

Option to add an image to the background #5

christopherkade opened this issue Jun 1, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@christopherkade
Copy link
Owner

christopherkade commented Jun 1, 2019

Users should be able to select an image from their computer and have it displayed as the background of the banner.

Another option would be to integrate something like Unsplash in order to retrieve free images directly through the app.

A few questions are important:

  • How should the positioning of the image work?
  • Should the user be able to move it around?
  • Should it fit the size of the banner (1000x420) automatically or be centred?

There is a problem with html2canvas not being able to generate a canvas based on an image though, so that would mean either changing the way we generate the canvas or dropping the idea.

@christopherkade christopherkade added enhancement New feature or request help wanted Extra attention is needed labels Jun 1, 2019
@thomasbnt
Copy link

Yeah please 👍

@diveresque
Copy link
Contributor

@christopherkade I could take a look at this one as well. Im not sure how easy it is to do, especially to create something moveable, but I could try and do the initial work.

@christopherkade
Copy link
Owner Author

Hey @diveresque, of course, go ahead and have fun.

I'm afraid html2canvas can't render images, which poses a big problem, but we could find work arounds & solutions together. If you have any questions please let me know.

@diveresque
Copy link
Contributor

Great :) will see how I go. A few questions:

  1. html2canvas - i tried hardcoding in an image just using background-image in the div, and downloading the banner and it seemed to work - unless im missing something?
  2. uploading images in React is new to me, just after a bit of research one option for uploading the image could be react-dropzone - did you have anything else in mind?
    Thanks!

@christopherkade
Copy link
Owner Author

christopherkade commented Jun 23, 2019

As you can see here, background-image isn't supported. So I'd be curious to see if you could make it work.

I don't have any experience with image uploading with React sadly, react-dropzone does seem very popular. It seems like a good choice 😄

@diveresque
Copy link
Contributor

Hi @christopherkade sorry it took me a while to get to this.. I started and have a basic dropzone set up, but just want to check im on the right track for the next part - thinking to use FileReader (Im not that familiar with it for this kind of usage) for the uploaded image and then try to display it in the Output, using something similar to what you have for the other inputs (color, title). Thoughts?

diveresque added a commit to diveresque/banner-generator that referenced this issue Jul 25, 2019
Using react-dropzone and FileReader to allow user to upload image from computer onto background-image of the banner christopherkade#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants