---
title: "Converter.ThumbnailResizeFailureDetector Property  HTML5/Flash Uploader PHP"
canonical: https://www.aurigma.com/docs/us8/FH_P_P_Converter_ThumbnailResizeFailureDetector.htm
product: "Upload Suite 8"
---

# Converter.ThumbnailResizeFailureDetector Property HTML5/Flash Uploader PHP

Supported technologies:
 
Configures how the uploader tries to detect whether image resizing failed due to memory issues and whether to retry.

## Syntax
 
```
public function getThumbnailResizeFailureDetector() {
}

public function setThumbnailResizeFailureDetector($value) {
}
```
 
### Property Value
 
Type: **integer**
 If `0` (default), it won't attempt to detect failures and do anything about it. If you set a larger value, it will be a number of attempts to create an image. 
Default value is **0**.

## Remarks
 
Under certain circumstances, a browser may fail to process an image (e.g. resize it). For example, it may happen if the system runs out of memory. Unfortunately, JavaScript does not give any means to handle this situation gracefully. It will just silently fail and return a blank image. As a result, you will observe an empty black image.
 
This property gives you an opportunity to handle this situation. For example:
 
- **Keep trying.**  Set this value to, say, 10. If some image is blank after resize, the uploader will try to resize the image again. If the image is blank again, it will try one more time - until the number of attempts reach the amount you have specified.
- **Fallback to the source image.**  Set this value to, say, 1, and add a second converter to [Mode](https://www.aurigma.com/docs/us8/FH_P_P_Converter_Mode.htm.md), e.g. `*=Thumbnail;SourceFile`. In this case, if the image is blank, it will notice the failure and switch to a fallback converter (`SourceFile`).

To speed things up, the algorithm does not check 100% of pixels. It breaks the image into a grid and selects certain pixels based on this grid. It works great with photos, but if you are uploading images with large amount of transparent pixels, it may produce false positives. Be careful!
 
If necessary, you may fine-tune the algorithm. To do it, instead of a number, pass the following JSON:
 ```
{step : 10, 		// grid sizetopPadding : 0, 	// offset from the top in percentleftPadding : 0, 	// offset from the left border in percentrightPadding : 0,	// offset from the right border in percentbottomPadding : 0,	// offset from the bottom in percentattemptCount : 0 	// the number you would pass to this param normally
}
```

## See Also
 
### Reference
 
- [Mode Property](https://www.aurigma.com/docs/us8/FH_P_P_Converter_Mode.htm.md)
- [Aurigma.ImageUploaderFlash.Converter.ThumbnailResizeFailureDetector ASP.NET Property HTML5/Flash Uploader](https://www.aurigma.com/docs/us8/FH_P_Aurigma_ImageUploaderFlash_Converter_ThumbnailResizeFailureDetector.htm.md)
- [$au.converter.thumbnailResizeFailureDetector JavaScript Property HTML5/Flash Uploader](https://www.aurigma.com/docs/us8/FH_P_J_$au_converter_thumbnailResizeFailureDetector.htm.md)
