@foundbyte/uni-libs 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/utils/obs/image.js +5 -2
- package/package.json +1 -1
package/es/utils/obs/image.js
CHANGED
|
@@ -70,8 +70,11 @@ function compressHuaweiObsImg(url, opts) {
|
|
|
70
70
|
* @param opts
|
|
71
71
|
* @returns
|
|
72
72
|
*/
|
|
73
|
-
function compressTencentObsImg(url,
|
|
74
|
-
|
|
73
|
+
function compressTencentObsImg(url, { w, h }) {
|
|
74
|
+
const prefix = `${url}?imageMogr2/thumbnail/`;
|
|
75
|
+
if (w && h) return `${prefix}!${w || ""}x${h || ""}r`;
|
|
76
|
+
if (w) return `${prefix}${w || ""}x`;
|
|
77
|
+
if (h) return `${prefix}x${h || ""}`;
|
|
75
78
|
return url;
|
|
76
79
|
}
|
|
77
80
|
function compressObsImg(url, opts) {
|