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

Enhancement: Custom Script support for media files and folders #97

Closed
estruyf opened this issue Sep 9, 2021 · 5 comments
Closed

Enhancement: Custom Script support for media files and folders #97

estruyf opened this issue Sep 9, 2021 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@estruyf
Copy link
Owner

estruyf commented Sep 9, 2021

Add an action on the media card to optimize the media its file size.

@estruyf estruyf added the enhancement New feature or request label Oct 3, 2021
@zivbk1
Copy link

zivbk1 commented Nov 16, 2021

I use imgix for delivering the file to the browser, with any transformations required for that place in the site design applied as transformation parameters in the URL. I tend to use shortcodes for image elements, or use the imgix URL in the preview.
So I try to keep my source files in the 'uploads' folder at their highest resolution and then transform them down with imgix to fit the design. The only downside to this, is that my media assets have to be pushed to the production server for imgix to see them and bring them down into my site preview. This means that I usually Push images live before the content is ready for production.

@estruyf
Copy link
Owner Author

estruyf commented Nov 17, 2021

@zivbk1 I've also been thinking about doing integrations with imgix/cloudinary/... Although, I feel this should be a way to extend it, not the preferred way. As it would otherwise bring a dependency on these services.

Thinking about an offline (via node) and online (via APIs) optimization approach. If you happen to have contacts with any of these services, feel free to bring them in touch with this project, so we can discuss the possibilities.

@zivbk1
Copy link

zivbk1 commented Nov 17, 2021

That makes sense. I don't think you would need to do much for imgix support, as it would be up to the site developer to use the appropriate URL wherever images are used on the site and for the "Web Folder" source option you would just point to the root of your website.

You could get super fancy and allow someone to setup an AWS bucket and use that for the Source for imgix. Then you would need to use the S3 API to push/pull and list the images there as users upload files into the media library. This would be really nice for people who don't want to store all the assets in their Git repository.

I have worked with other projects where you set a maximum height and width for images uploaded to the git repo, and when you upload an image it transforms the file to be less than those limits. I could see something like this being pretty useful.

@estruyf
Copy link
Owner Author

estruyf commented Nov 19, 2021

As image optimisation requires local tools, I'll enhance the custom script functionality in order to allow you adding scripts for media files and folders.

With this enhancement, you'll have more extensibility capabilities and allows you to do much more.

@estruyf estruyf changed the title Enhancement: Optimize media size Enhancement: Custom Script support for media files and folders Nov 21, 2021
estruyf added a commit that referenced this issue Nov 21, 2021
@estruyf estruyf added this to the 5.6.0 milestone Nov 22, 2021
@estruyf estruyf mentioned this issue Nov 23, 2021
@estruyf
Copy link
Owner Author

estruyf commented Nov 23, 2021

Now available in the v5.6.0 release

@estruyf estruyf closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants