x-dr / telegraph-Image

https://img.131213.xyz
1.12k stars 964 forks source link

求求作者+个超过5M可以压缩的功能吧 #15

Closed xiaochenhh closed 6 months ago

xiaochenhh commented 7 months ago

+个超过5M可以压缩的功能吧,可选可不选的那种!!

x-dr commented 6 months ago

我有空看看

xiaochenhh commented 6 months ago

嘿嘿嘿感谢~麻烦啦~

x-dr @.***> 于 2024年5月12日周日 19:35写道:

我有空看看

— Reply to this email directly, view it on GitHub https://github.com/x-dr/telegraph-Image/issues/15#issuecomment-2106216198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXPATYVXWNOIVSLU4USPWZDZB5HYJAVCNFSM6AAAAABGRTT7IOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGIYTMMJZHA . You are receiving this because you authored the thread.Message ID: @.***>

x-dr commented 6 months ago

把https://github.com/x-dr/telegraph-Image/blob/52d1b8a82e1e040dfd9ae4cbc03d32c641ffdbeb/asset/js/upload.js#L21 注释掉 ,然后根据需求加上这几个参数即可 。 image

    maxImageWidth: 200,   
    maxImageHeight: 150,    
    resizePreference: 'height',
    maxFileCount: 1,
    resizeImage: true,
    resizeIfSizeMoreThan: 1000,

具体说明可以看bootstrap-fileinput 的文档

xiaochenhh commented 6 months ago

感谢作者~ヾ ^_^♪麻烦啦~

x-dr @.***> 于 2024年5月14日周二 00:47写道:

https://github.com/x-dr/telegraph-Image/blob/52d1b8a82e1e040dfd9ae4cbc03d32c641ffdbeb/asset/js/upload.js#L21 注释掉 ,然后根据需求加上这几个参数即可 。 image.png (view on web) https://github.com/x-dr/telegraph-Image/assets/79109673/43d49d82-81bd-431a-800f-01f8783c06b0

maxImageWidth: 200,
maxImageHeight: 150,
resizePreference: 'height',
maxFileCount: 1,
resizeImage: true,
resizeIfSizeMoreThan: 1000,

具体说明可以看bootstrap-fileinput https://plugins.krajee.com/file-input/plugin-options#minimageheight的文档

— Reply to this email directly, view it on GitHub https://github.com/x-dr/telegraph-Image/issues/15#issuecomment-2108191551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXPATYSDX3RVAKXAGTX4JRLZCDVCHAVCNFSM6AAAAABGRTT7IOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGE4TCNJVGE . You are receiving this because you authored the thread.Message ID: @.***>