[Vuejs]-Vue v-for works if there are only 7 elements in the array

0πŸ‘

βœ…

This is because you are trying to get a profile image off an object that does not exist.

You should always check data before referencing an object e.g.

<div class="avatar" v-if="message.user && message.user.profile_image">
    <img :src="message.user.profile_image">
</div>

0πŸ‘

<label for="designimage">Design Image </label><br>
@if ($designs->design_image == NULL)
    <img src="{{    asset('images/design_image/defult.jfif') }}"  height="300"       width="300">//set defult image path
@else
    <img src="{{ asset('images/design_image/'.$designs->design_image) }}"           height="300" width="300">//orignal image path
@endif

Leave a comment