Sniff for getimagesize()
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
先從 getimagesize() 違規範例和建議的 wp_get_attachment_metadata() 路徑開始,然後檢視規則集如何識別 PHP 函式呼叫。在定義完成標準並為這兩種情況新增涵蓋範圍之前,釐清媒體庫圖片與外部 URL 的預期處理方式。
由索引模型根據 Issue 內容生成。
描述
What problem would the enhancement address for VIP?
getimagesize() holds up the PHP process downloading the entire image to just read its file size.
Describe the solution you'd like
Most images in WPs Media Library have width and height attributes already (like from wp_get_attachment_metadata()) & that existing data should be used instead.
If the image is external and not in WordPress' media library, perhapes:
- a VIP helper function could be created to download only first few bytes of image
- don't use this function, or do image sizing w/ JS or CSS instead
What code should be reported as a violation?
$size = getimagesize( $image_url );
list($width, $height) = getimagesize( $image_url );
//etc.
- 主要語言
- PHP
- 星號
- 261
- 分支
- 44
- 平均合併
- 3 天 9 小時
- 30 天內合併 PR
- 10
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Automattic/VIP-Coding-Standards 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
Automattic/VIP-Coding-Standards#876 ·
維護者通常 1 天內回覆
-
Breaking Change Type: Maintenance
難度 4/5 3-5 天 新手友好度 35/100
Automattic/VIP-Coding-Standards#849 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 45/100
Automattic/VIP-Coding-Standards#832 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 48/100
Automattic/VIP-Coding-Standards#823 ·
維護者通常 1 天內回覆
-
Status: Awaiting feedback
難度 2/5 1-3 小時 新手友好度 45/100
Automattic/VIP-Coding-Standards#754 · 3 則留言 ·
維護者通常 1 天內回覆
查看 Automattic/VIP-Coding-Standards 的全部 Issue
相似的 Issue
-
enhancement
難度 1/5 1 小時以內 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 82/100
grokability/snipe-it#19996 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 82/100
維護者通常 1 天內回覆
-
Add a dark theme未關閉good first issue laravel-appointment-reminders
難度 2/5 1-3 小時 新手友好度 82/100
-
Text to Speech fails on Windows: the temp file path loses its backslashes when stored in post meta可能已有人在做 @azizulhasan 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆