jquery - Resize uploaded image to multiple dimensions -


i'm building own simple cms. here problem images. loading large size images slow down website. i'm here ask how resize image multiple dimensions example: image.jpg orginal size 1280x720pixels; thumbnail create image250x250.jpg; inside post usage image500x350.jpg , on. using same image thumbnails, posts , on. i'm styling css.

thanks , best regards!

after user uploads image, you'll need create , retain multiple copies of image on server (one copy per desired size). imagemagick software commonly used such tasks.

there many explanations online go more detail, in general you'll want install imagemagick on server, enable imagemagick php extension.

after creating few copies of uploaded image, can use imagick::resizeimage function independently modify size of each one.

if you're unable install php extension, can instead invoke imagemagick's convert command line utility via php's exec() function.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -