Description

This function displays a branding image's URL.

Examples


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$branding_image = $cpanel->api1('Branding', 'image', array('image', '0', 'package1', '1', '0', '0', '1', '0) ); // Call the function.

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $branding_image = $cpliveapi->api1('Branding', 'image', ['image', '0', 'package1', '1', '0', '0', '1', '0] ); # Call the function.

 

<cpanel Module="Branding::image( $FORM('imagefile','isvar','pkg','needfile','nomagic','needboth','reqext','skip_logo_check'))">
cpapi1 --user=username Branding image image 0 package1 1 0 0 1 0

/cPanel_magic_revision_1161741169/frontend/paper_lantern/branding/image.jpg

 

Parameters

ParameterTypeDescriptionPossible valuesExample
imagefilestring

Required

The image filename.

A valid image name, without the file's path or extension.image
isvarBoolean

Whether to return the full URL.

Only use this parameter when you call the function from a Perl script.

This value defaults to 0.

  • 1 — Return the URL value as a variable.
  • 0 — Print the URL value.
0
pkgstring

Required

The name of the branding package to search.

A valid branding package name.package1
needfileBoolean

Required

Whether to return the cPanel_magic_revision URL.

  • 1 — Return the full URL.
  • 0 — Return the cPanel_magic_revision section of the URL.
1
nomagicBoolean

Required

Whether to return the image file's absolute path.

  • 1 — Return the absolute file path.
  • 0 — Return the cPanel_magic_revision URL.
0
needbothBoolean

Whether to return both the file and the URL.

Only use this parameter when you call the function from a Perl script.

This value defaults to 0.

 

  • 1 — Return the file and image URL.
  • 0 — Do not return the file and image URL.
0
reqextBoolean

Required

Whether to return the image's filename extension.

  • 1 — Return the filename extension.
  • 0 — Do not return the filename extension.
1
skip_logo_checkBoolean

Required

Whether to return the file.

  • 1 — Return the image's file.
  • 0 — Return the image's URL.
0


Returns

This function returns a URL to the image file, a full file path, or an image file.