• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Image upload

Image upload 9 years 2 months ago #34166

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Hi Everyone, I wonder if someone could help with this.

I have members uploading images to my forms and in order to save space and upload time i limit the size to a max of 750kb per image. However I want to also make the form mobile firendly and allow the user to use their camera on their ipad/phone etc. This os course will not work as the camera takes images which are higher than 750kb.

I have found this php code online and I wondered if it would work with RSform and if so where would i put the code in the back end? Any help greatly appreciated.

<?php function compress($source, $destination, $quality) {

$info = getimagesize($source);

if ($info == 'image/jpeg')
$image = imagecreatefromjpeg($source);

elseif ($info == 'image/gif')
$image = imagecreatefromgif($source);

elseif ($info == 'image/png')
$image = imagecreatefrompng($source);

imagejpeg($image, $destination, $quality);

return $destination; }

$source_img = 'source.jpg';
$destination_img = 'destination .jpg';

$d = compress($source_img, $destination_img, 90); ?>

See more at: www.apptha.com/blog/how-to-reduce-image-...sthash.vsO5Ehq3.dpuf
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!