Most developers resize images on the client using CSS. But this is bad.
It’s bad because you have allowed the user to download the original heavy image with their data. #25DaysOfMediaMagic 😎😇
Just use @cloudinary <img> or <video> tags in HTML with the desired dimensions and embed in your site like so:
Check out the next tweet...
cl_image_tag(“sample.jpg”, :width=>300, :height=>100, :crop=>”scale”)
Which will result in HTML code like so:
<img src=”res.cloudinary.com/demo/image/upl…”> #25DaysOfMediaMagic 🔥🔥🔥🔥
You immediately move from a wicked to a thoughtful developer.
We’ll continue tomorrow. Stay tuned! #25DaysOfMediaMagic 🚀 🚀 🚀