You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<div|span|...
*ngf-thumbnail="file" //Generates a thumbnail version of the image file
ngf-size="{width: 20, height: 20, quality: 0.9}" the image will be resized to this size
// if not specified will be resized to this element`s client width and height.
ngf-as-background="boolean" //if true it will set the background image style instead of src attribute.
If the ngf-size attribute is not set, the height and width for the thumbnail will be calculated. Problems occur if the computed css value, which the calculation defaults to, is a percentage value. Then the last two characters get spliced and i.e. height/width: 100% gives an element height/width of 10 resulting in a drastically downscaled thumbnail.
The text was updated successfully, but these errors were encountered:
It is probably related to this bug: #1737
It does not splice or anything like that it just calculates the width and height by the code specified here: https://github.com/danialfarid/ng-file-upload/blob/master/src/data-url.js#L140 so whatever the computed style is for that element it would use that width and height. Maybe you already have a default image in there with that size or your calculated style would be of 10 size.
From the example:
If the ngf-size attribute is not set, the height and width for the thumbnail will be calculated. Problems occur if the computed css value, which the calculation defaults to, is a percentage value. Then the last two characters get spliced and i.e. height/width: 100% gives an element height/width of 10 resulting in a drastically downscaled thumbnail.
The text was updated successfully, but these errors were encountered: