Faster Transform Speed: sort output transform last#39
Faster Transform Speed: sort output transform last#39lablancas wants to merge 2 commits intofilestack:masterfrom
Conversation
| const expected = { | ||
| img: { | ||
| src: 'https://cdn.filestackcontent.com/output=format:webp/quality=value:5/sepia=tone:70/seW1thvcR1aQBfOCF8bX', | ||
| src: 'https://cdn.filestackcontent.com/quality=value:5/sepia=tone:70/output=format:webp/seW1thvcR1aQBfOCF8bX', |
There was a problem hiding this comment.
Unfortunately it will have a negative impact in this case scenario. If the input file was an image that doesn't support the quality setting, let's say a png image, the quality task wouldn't be applied, as the image would still be a png at this point. In the old example the image would be converted to webp before running the quality task, making it possible to apply the quality setting. Notice the difference in image quality in the below examples:
https://cdn.filestackcontent.com/quality=v:1/output=f:webp/LJNf24eDS1O7GsbpaEMs
https://cdn.filestackcontent.com/output=f:webp/quality=v:1/LJNf24eDS1O7GsbpaEMs
I'm not familiar with the adaptive package, but it looks to me that it might require a greater refactoring in order to make it possible to apply the output task as the last task in chain (which makes perfect sense) with being backwards compatible at the same time.
There was a problem hiding this comment.
@gr00by87 I could update the sort function so that quality is sorted after output, but I am not sure if sepia (or other transformations) should also be sorted after the output transform?
Filestack engineering team recommended that we put the output transformation last in the URL.
This does seem to provide a drastic reduction in image delivery time.
Please review and confirm that changing this order does not have some other negative impacts.