> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://staging.chrisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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!');
	        }
	    });

});

});	
```