How to execute face detection with non-local files in React JS app? - reactjs

Right now I'm working on a movie browser app which displays images of the acting cast. The images themselves are loaded from an external source via a URL link. I'm wondering how I can pass those images through a face detector, and display the cropped face within an img tag?
The image tag itself requests a src, but I intend to use the image after it has been passed through the face detector, meaning it won't be coming from an external source. I don't think I can pass an image matrix into img directly, so how could I store the image within my React app so it can be passed into img?
This app will be deployed on GitHub Pages or Netlify for public viewing, so I won't be able to modify the source files presumably. I'm assuming a server will come into play but how?

Related

Is it a way to imitate iOS native custom url call from a React app?

Facebook has this Sharing to Stories functionality fro native iOS and Android. I am not sure possible or not but I would to do the same, open Instagram, and profile with custom content.
Seems open Instagram works, but profile data not. Do you know why?
Image is copied programmatically, put on pasteboard, and url loads this instagram-stories://share?source_application=2773133082797983 but till content, the mp4 is not loaded. What do I miss? Is it even doable from a React app??

Sharing image on Instagram iOS, sometimes gets the last image from the gallery and not the downloaded image

I'm using this code to download the image of an uri and then pass it to the function that opens Instagram like a UImage.The problem comes when I try to share another image, the application gets me the last image that I use, and not the one that I'm downloading or selecting, and I trying to delete this local file, but I can't remove it.
https://learn.microsoft.com/en-us/answers/questions/577839/sharing-image-on-instagram-ios-something-get-the-l.html

How can I download a NextJS page as a static HTML file?

so I have this website made with Next and on a page there are some graphs (the graphs content changes as it fetches an API) and info.
I want to add a button to the page and when pressed it download the page as a HTML file and includes all the JS and CSS in the HTML file instead of separately, does anyone have any idea as to how to approach this problem. (The graphs content should be the same content as it was on the time of downloading)
(The reason why I want to do this is because I want to distribute these files to others and I want to allow them to read it w/o an internet connection)
You can't really download a React 'page' because there are no pages in React to download.
Next further complicates this because it server-side renders everything and rehydrates client-side. If you inspect one of your pages, you'll see the JSON blocks Next uses for data. Look for the __NEXT_DATA__ script (usually in the footer of your page).
I think the two strategies you could use:
Screen-capture of the graphs during your build sequence and push them over to an AWS S3 bucket or similar (cumbersome)
When I ran into a requirement like this, I just made the data for the graph available as a JSON download just below the graph and it satisfied the use case sufficiently.
If you just want to download the assets and take a look, a workaround is probably leveraging the next/export package. This allows you to run yarn build and generate a static export of your entire site. This should include the file you're looking for.
Just some ideas to think through.

URL link preview issue in react JS

We are having one problem while generating a link preview for our react application URL's. Actually we have the requirement to display the dynamic link preview for different URLs.
We are able to add the link preview by using open graph tags in our index.html file placed under the public folder.
But once we tried to add dynamic metadata using the "react-meta" or "helmet" package. it is successfully changing the title of the application. but links preview are not working after making these changes.
so I kindly let me know if there is any way that we can different link preview for different urls for react application. Thanks in advance.

How to store images in firebase using URL from cloud storage service?

Hi I am developing an ionic app using firebase as my database.
I read this question.
I understand it and have a more specific question.
I uploaded an image on amazon s3, imgur and filestack, and tried all three in firebase using data:url/<the url of image> and data:image/jpeg;<url of image>.
Am I typing something wrong into firebase?
The image does not come up. I do not want to write code in the app to upload the image etc, I just simply want an image to display on the app beside some data corresponding to an item in my firebase database.
I have read about base64, do I have to use it in this case?
(Optional) Perhaps If you could expand on the steps of doing this:
"You can use a filepicker to get the image file. Then you can host the image however you want, i prefer amazon s3. Once the image is hosted you can display the image using the url generated for the image."
I don't have much ionic experience, but why not just save the direct path to the image url and not include the data:url/ portion.
Simply store the url in firebase and then when it's retrieved inject it into your img src.

Resources