开发者

Image cropping at presentation layer/front-end

开发者 https://www.devze.com 2023-02-21 23:24 出处:网络
Our site creates various crops/sizes (of an image) UPON image upload. We want to move away from this approach, as our presentation 开发者_StackOverflow中文版layer/front-end morphs over time, and subse

Our site creates various crops/sizes (of an image) UPON image upload. We want to move away from this approach, as our presentation 开发者_StackOverflow中文版layer/front-end morphs over time, and subsequently, the image presentation size requirements change. What's the best, most long-term sustainable approach to do this? Guidance appreciated. We're working with: HTML, CSS, JQuery, PHP/mySQL and Drupal.


The best approach would be to continue generating the thumbnails as you do currently but keep the original uploaded as is. Later down the time, lets say the image requirements change, it would be easier to run a script and re-generate all the images. This way we make sure that we are not doing image croping at runtime, because this can be time consuming and resource intensive.

Let me know if this helps.

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号