Articles on: HTML5 App (Developer Version)

Saving the product image with PHP

You find a PHP script in the source folder, which will save an image on your webserver. You only need to send the data url of your product to this script, which will create an image from it.


//send data url to php script when clicking on a custom element
$('#save-image-php').click(function() {
thsirtDesigner.getProductDataURL(function(dataURL) {

$.post("php/save_image.php", { base64_image: dataURL}, function(data) {
if(data) {
//window.open(data, '_blank');
}
else {
//do what you want here, e.g. alert('Image Generation failed!');
}
});

});

});


JavaScript

Updated on: 06/08/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!