I am using cfimage
for image resizing and it is working well. my Question is i want to use the cfimage
to resize the image based on screen size or i can use function where it should see if the screensize is smaller, use the smaller image else use larger image
some function which i can write once and do anywhere instead of doing it in all pages, i know one thing is server side and other is cf side but what if i send the viewport to the cfside
, will it help or not
right now its working well but needed the update as to how can i build once and do in all
The " adaptive images " approach does exactly this. You can find a CFML (Lucee/ColdFusion) implementation at https://github.com/cfsimplicity/AdaptiveImages
Essentially it works as follows:
Obviously there is a performance overhead but I've found it to be negligible and well worth the benefit in terms of reduced bandwidth.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.