Best way to display default image if specified image file is not found?

后端 未结 6 2040
清歌不尽
清歌不尽 2021-02-04 06:12

I\'ve got your average e-Commerce app, I store ITEM_IMAGE_NAME in the database, and sometimes managers MISSPELL the image name.

To avoid \"missing images\" (red X in IE

6条回答
  •  情书的邮戳
    2021-02-04 06:49

    I think your way is pretty much OK. I'd do it in a function or do in .categoryImage accessor.

提交回复
热议问题