Hi!
At the moment I am using an uploader for profile pictures, and when a picture (avatar) is uploaded, two derivatives are created in background. A “medium” one for use on pages, and a “small” one for the navbar.
This is working fine. I also need to implement image uploads with Imperavi Article rich text editor (I’m building a CMS). In this case, I don’t think I can leverage backgrounding because otherwise the images would be referenced in the rich text as coming from the cache. So even if the derivates are created, loading that text would mean always loading images from the cache. Not only can those images be too big, the cache is also going to be cleared periodically.
Questions:
- is it possible for this specific image uploader to disable backgrounding and have derivatives created right away when uploading and make sure that the URL returned after uploading is already the URL for the “store” and not the cache? This way when the rich text is rendered I can be sure that the images are loaded from the store and not from the cache.
2.I’m going to try and limit the max file size when a user attaches an image to a text (not sure of how to do that with the Imperavi editor yet), but anyway I want users to be able to upload images of up to a few megabytes at least, for convenience, so that they don’t have to resize the images themselves each time before uploading. Then Shrine would resize the images to a smaller file size that can be more efficient for downloading when the rich text with the images is rendered. Is it possible to have Shrine store a derivative as the default image, instead of the original bigger image, in the “store” storage, so to avoid waste of space, and then return the URL of that image?
I’m still new to Shrine and am replacing ActiveStorage. So please be patient if I’m asking dumb questions
Thanks!