ene's avatar
Level 2

image is blurry on view

i noticed any time i upload a high quality image its does not display properly ( blurry ) until the width and height is increased please how can i resolve this

foreach ($this->images as $key => $image) {
                $this->images[$key] = $image->storeAs('posts', str::random(30));
                PostImages::create([
                    'post_id' => $post->id,
                    'filename' => $this->images[$key],
                ]);
            }

            $this->images = json_encode($this->images);
0 likes
1 reply
Tray2's avatar

The browsers aren't that good on resizing images on the fly like that. You should decrease the image size serverside after the upload.

Intervention is a good package for that.

http://image.intervention.io/

Please or to participate in this conversation.