PHPから返されたjsonデータから約50枚の画像をロードしています。画像サイズを取得する PHP の余分な呼び出しを避けるために、クライアント側でこれを行いたいと思います。これは可能ですか?
イメージ リストを作成するための現在の jquery 呼び出しは次のとおりです。
// Create HTML for the images.
var html = '';
$.each(data.profiles, function() {
// Can I determine the img height or do I need to wait until the image is loaded?
html += '<a href="/view_profile.php?id='+this.user_id+'">';
html += '<img src="'+this.file_name+'" width="200" height="" style="border:0;">';
html += '</a><br>';
});