When I read the docs of strapi v3, I found that there is an option that produces responsive images, means that when we add an image, it produces other sizes in the public/uploads address of strapi directory. That feature works in my project and when I upload for example an image called figure-1-1.png, it produces some other images with different sizes in my upload folder.
But how can I use those other images in my contents? For example suppose that I have a content that uses "rich-text". In that content when I use image icon in the editor, it inserted a link of the main image to my content like below:
![figure-1-1.png](/uploads/figure_1_1_c589d010c9.png)
So how could I benefit from other sizes? How could I use them in strapi that for example in mobile resolution the smallest size is used? Is there anything that I misunderstood?
Related
I am creating reactjs app, from which i can generate image for different social media platforms sizes, for example facebook cover image size, user will hit click on download button and it will download an image of the desired size.
I searched lot but did nothing
Is there any way i can do this?
I have an e-commerce react app, so as you know every product has at least three or four images, so to show the image of product in my website i created a folder with a name of " images " inside the public folder so everytime i want to show images of a specific product i can get and show them very simply and for Now this is very very awesome.
The Problem:
as we know each e-commerce website should have an admin where he can publish new products and upload new images, so by the time may be i will have thousands of images in my website.
Question
what is the best practice to store images of my react app ?
do i need to use third party like AWS or Firebase ?
Thank you.
Storing images in the code-base assets folder is not the best option for large number of images. Handling updates, inserts is a big problem. So you have the following options.
Options: Cloud/On Premises
You may store in the cloud like AWS S3
If you want to store on premises, you may store in MongoDB Grids
or even on the File System with file-path stored in the database.
Step Ahead
But going ahead you might need responsive images according to the image placeholder. Example for an image you might need thumbnails of different sizes lets say for listing pages, android apps, iOS apps.You might also need to compress the images in case they are heavy for web purpose.
In that case you may choose to store the images in the desired
resolutions.For this you'll have to store multiple versions on an image. For example product1/original.jpg, product1/compressed.jpg, product1/300x300.jpg etc
You may resize/crop the images on the fly. If you want to write your resizing systems you may write ImageMagick/vips/PIL etc based code.You may try to search for readymade nginx based plugins to server responsive images.
If you do not want to do this resizing stuff yourself you may use image storage services like imgix,cloudinary,akamai that provides CDN + image manipulations.Some of these provide storage+manipulation while some only manipulation.
I am working on a react project in which we generate new images by fitting uploaded image in a tv screen, or laptop screen or mobile screen. So what I want is a way in which I can place the uploaded image into this below image
In the black tv screen I want the uploaded image to fit and below there will be download option to download the uploaded image.
I searched for that and came across cloudinary react library. So I wrote this code to somehow fit an image inside this image but I can't seem to find any way to download that image.
If you have any idea of doing this please share with me.
Thank You in advance
You can overlay images on other images without having to use a particular Cloudinary SDK, as outlined here: https://cloudinary.com/documentation/image_transformations#adding_image_overlays
You can then place them more specifically using x and y coordinates in the URL as outlined here: https://cloudinary.com/documentation/image_transformations#placing_overlays
Once you have generated an image with the overlay positioned correctly (and with any other transformations you may wish to process), you can download the generated image as normal.
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?
I'm new to Salesforce surveys and I'd like to embed a URL (for this example, https://www.google.com) in an image. I've tried following their documentation here but it's a tad confusing. The survey's editor doesn't give any built-in options - this is what I have right now:
In a wild attempt I tried:
To no avail - it just displays the plain text in production. How can I embed a URL in an image (if possible)?
After researching a bit more I found this here:
"..Upload Image and select an image from your local host. You can upload only JPEG, PNG, or GIF files. The file cannot exceed 1 MB. You can’t add a hyperlink to an image. Copying inline images from external sources to the text editor is not supported."
Looks like it's not possible :(. I'm still searching for a workaround if one exists.