• Home
  • Demo
  • Buy Now
RISE - Ultimate Project Manager & CRM
    RISE - Ultimate Project Manager & CRMInstallation & MaintenancePersonalizationSettingsClient ManagementAI AssistantInvoices & PaymentsProjects & TasksTeam & CollaborationProductivity ToolsSales & ServicesRISE ReportsPluginsFAQChange logs
Mailbox PluginLanding Page Builder PluginEasy Backup PluginSquare Payment Method PluginLogin as Client PluginAsset Management Plugin2 Factor Authentication PluginPassword Manager PluginSocial Login PluginGoogle Meet Integration PluginSpreadsheets PluginZoom Integration PluginAuto Attendance PluginWhiteboards PluginDocs PluginBlog Manager PluginWhatsApp Link PluginMicrosoft Teams Integration PluginProperty Management PluginTelegram Notification PluginAWS S3 Integration PluginWhatsApp Notification PluginWasabi Integration PluginBackblaze Integration PluginCloudflare R2 Integration PluginDigitalOcean Spaces Integration PluginAdyen Payment Method PluginbKash Payment Method Pluginiyzico Payment Method PluginJazzCash Payment Method PluginMercado Pago Payment Method PluginMidtrans Payment Method PluginMontonio Payment Method PluginN-Genius Payment Method PluginNagad Payment Method PluginPayFast Payment Method PluginPaysera Payment Method PluginPaystack Payment Method PluginPix Payment Method PluginRazorpay Payment Method PluginRocket Payment Method PluginSSLCommerz Payment Method Plugin
  1. Docs
  2. RISE - Ultimate Project Manager & CRM
  3. Plugins

Image upload control for plugins

RISE has one image upload control for profile pictures, logos and icons. Use it in your plugin when a form needs an image. It shows a button with two options: Upload and crop and Upload with the required size.

Show the control

Put it inside the form that saves the image. Add a preview image with its own id.

...
<?php
echo view("includes/image_upload", array(
    "name" => "my_logo",
    "width" => 300,
    "height" => 100,
    "preview" => "#my-logo-preview"
));
?>

The crop box is added for you. The control works in full pages and in modal forms.

ParameterWhat it does
nameField name. Required. The form posts name (the cropped image) or name_file (the uploaded file).
width, heightImage size in px. Default 200 x 200. The size is shown in the menu, and an uploaded file must have this size. Use 0 for any size (like logos): the crop frame fits the whole image, and an uploaded image of any size is accepted.
previewSelector of the preview image. Default #name-preview.
auto_submittrue = submit the form right after an image is chosen. Default false.
buttondefault = a normal Upload button. icon = a round camera button for the corner of an avatar.
button_textText of the default button.
crop, directfalse hides Upload and crop or Upload.
default_imageURL of the default image. Shows a Remove picture option, which posts name = remove.

For a small avatar with the camera button on its corner, wrap the image and the control in

.

Save the image

In a controller that extends Security_Controller:

$image = $this->get_posted_image_file("my_logo", get_setting("system_file_path"), "my-logo.png", 300, 100);
if ($image) {
    //save $image in your table, delete the old file with delete_app_files()
}

It returns the file info to save in the database, or an empty text when no image was posted. When the uploaded file is not an image of the right size, it sends an error to the form and stops. Pass 0, 0 as the size to accept an image of any size.

Profile pictures

Team members, client contacts and lead contacts use the same profile header: users/profile_header. The old view users/profile_image_section was removed. To save a user's picture from your own controller, check the access first, then call $this->save_user_profile_image($user_info).

AI agent pictures

To show an AI agent's picture, use get_ai_agent_avatar($agent->image, $agent->ai_service). It returns the agent's picture, or the logo of its AI service when it has none.

Was this article helpful? Yes No
How can we improve this article?
© 2026 Fairsketch
Home Get Support Buy Now

Delete?

Are you sure? You won't be able to undo this action!
To do