463 questions
1
vote
1
answer
36
views
How to resize image by ratio, like 4:3 or 1:1, using spatie media library
I am using spatie media library in my Laravel project.
Now I want to make two different image thumbnail or conversion. Ratio of first one is 1:1 and another one is 4:3.
Like if I upload an image ...
1
vote
0
answers
26
views
Image upload with docker changes app.php makes docker won't run
Image upload with docker changes app.php causes Docker to not run.
I am new in Docker. I'm studying CRUD and the frontend is React and backend is Laravel.
Docker compose runs nginx, mysql, php-fpm.
In ...
0
votes
1
answer
43
views
My uploaded images are rotated with laravel / intervention
I am using intervention to manipulate some images with Laravel 11.
My code works fine in local environment.
When I deploy the application in production (heroku), the same code produces a surprising ...
-1
votes
2
answers
343
views
Unresolvable dependency resolving [Parameter #0 [ <required> Intervention\Image\Interfaces\DriverInterface|string $driver ]] in class
I'm using :
Laravel 11
"mews/captcha": "^3.4"
Windows
Laragon
error occurs when i want to try {!! captcha_img() !!}
Unresolvable dependency resolving [Parameter #0 [ <required&...
1
vote
0
answers
312
views
Upload image Intervention Image v3.7
The error Unable to decode input is occurred at the line $image = $manager->read($file);. Here is my code:
Controller
public function upload(Request $request)
{
try {
$...
0
votes
0
answers
17
views
Appropriate Statistical Test for pre to post data with imputed data sets?
Thank you in advance for your time and help!! I'm working with data with 70 participants that completed an intervention. Participants completed surveys before and after the intervention (so pre and ...
0
votes
0
answers
67
views
warning message after install Intervention Image Package for Laravel
Hello, I deiced to write some code that compress the image size before uploaded to the app, than i hear about Intervention Image Package and i install it V3 after that their is a some steps like ...
1
vote
1
answer
60
views
X , Y cordinates not working properly in Intevention image
Using PHP
I am trying to add watermark images,
I am using Intervention Image library for the same
I have a requirement to add a watermark a bit right side, infact a bottom-right portion of the image
...
0
votes
0
answers
112
views
Laravel Media Library: Custom Manipulation/Conversion?
Context:
What's trying to be achieved is, when a video is uploaded and added to a collection I want to have a conversion that will generate a timeline preview of the video (many frames stick together ...
2
votes
2
answers
845
views
Why calling Intervention\Image raised error Drivers\GD\Driver not found?
I installed intervention/image 3.5 on Laravel 10 app and got error :
Class "Intervention\Image\Drivers\GD\Driver" not found
With code :
use Intervention\Image\ImageManager;
use Intervention\...
0
votes
0
answers
310
views
Why did I fail to add border to image with resizeCanvas of intervention/image?
In laravel 10 app with intervention/image 3.4 I try to make an border on source image and looking at the
example https://github.com/Intervention/image/issues/1120#issuecomment-962696288 I use ...
0
votes
0
answers
535
views
How to install latest intervention/image in laravel app?
I want to upgrade my project and checking https://image.intervention.io/v3/ package I see that 2x version is absolute.
But I failed to remove this project with message :
$ composer why intervention/...
1
vote
5
answers
7k
views
Laravel Class Intervention Image not found
I'm new to Laravel, I use Intervention Image on laravel 10.39.0, but it is getting error,
Class "Intervention\Image\Facades\Image" not found
This is the code.
This is the code.
<?php
...
0
votes
1
answer
4k
views
"Intervention\Image\ImageServiceProvider" not found
The whole project stops working after installing Intervention Image
The entire project stops working after installing Intervention Image.
I have a Windows system and XAMPP installed (just for ...
0
votes
1
answer
488
views
Intervention Image and imagemagick Combine images into multiple page PDF in PHP
I can produce a PDF with one image using Intervention Image and imagemagick but cannot find a way to combine images and output them as one multiple page PDF?
$url = Image::make('https://res....
0
votes
2
answers
104
views
Can't write image data to path from my admin panel
So I have this code for uploading images in my laravel app:
$imageName = rand(111, 99999) . '.' . $extension;
$imagePath = 'images/category_images/' . $imageName;
Image::make($image_tmp)->...
0
votes
0
answers
114
views
Intervention Image NotReadableException when using base64 image data
I’m using Intervention Image in a Laravel project and I’m trying to create an image from a base64 encoded string.
Here is the code of the Service:
<?php
namespace App\Services;
use DB;
use Image;
...
0
votes
2
answers
146
views
Resizing uploaded file and saving with the same name in the same location
I try to save an image and resize with Intervention. Filesystem.php has default settings for Laravel 10.
I can successfully save under storage/app/public/image:
$file->storeAs('public/image/', $...
0
votes
1
answer
860
views
Laravel 10 Image source not readable
I want to upload an image on my app, but when I do that, I have this error "image source not readable". I checked the file path and name, all fine. I've linked the folders, but I don't know ...
0
votes
1
answer
453
views
How to save image intervention stream image in public folder laravel
I'm saving image file in storage folder, its working fine
$ext = "jpg";
$imageConvert = \Image::make($image->getRealPath())->stream($ext, 60);
$img = rand(10, 100) . '_piku....
0
votes
1
answer
2k
views
Laravel controller using Intervention Image for image resize/crop is outputting pixelated images
I've made this class for Laravel that leverages Intervention Image Cache to process and cache images uploaded by the user. This class is called via a GET endpoint that passes things like image URI, ...
0
votes
1
answer
617
views
cache image using intervention/imagecache package in laravel 8
i want cache a image with intervention/imagecache package(downloaded from github).
my problem:
after cached image when time image was deleted on host or local cached image not accessible. it seems ...
0
votes
1
answer
335
views
Intervention Image - Reducing image size gradually
I'm trying to reduce the size of the images uploaded by users on a project I'm working on. The main idea is to resize the image down by 10%, and checking if its size is under a set requirement.
Here ...
0
votes
0
answers
303
views
ImageIntervention & Laravel 9: file_put_contents ERROR Failed to open stream: No such file or directory
I'm using Laravel 9 and Image Intervetion to resize uploaded images:
public static function resize($file, $fileName)
{
$path = self::route();
foreach (self::size() as $key => $...
0
votes
1
answer
193
views
Image Intervention Can Not Be Installed On Laravel 9
I'm using Laravel v9.4 with PHP v8.2 and I wanted to install Image Intervention package on my project, so I ran:
composer require intervention/image
But I get this error:
PHP Deprecated: Return type ...
0
votes
0
answers
196
views
Fonts size issue in adding watermark on image laravel
I'm using intervention Image in laravel for writing text over image. every things worked well except the fonts size. how can I make it bigger??
thanks for any help!
Image::make($avatar)
...
0
votes
3
answers
582
views
Convert image from png to jpg using PHP Intervention
I want to encode image from png to jpg but for some reason it doesn't work. Although judging by the examples it should, what can be a problem? It does the resize part, but when it comes to changing ...
0
votes
1
answer
302
views
Updating composer library after files deployed to shared production server
I created a website using laravel.
I uploaded the site to my shared server, and site was running fine.
After that I had to add a library called Intervention. In local, I used this command and ...
0
votes
0
answers
812
views
Why I got error with image/intervention after I moved laravel site under docker?
I moved laravel site under docker(based on php:8.1.6-apache) under my local ubuntu 20
and I use medialibrary and intervention for images controlling, but I got unexpected error :
Unable to init from ...
1
vote
1
answer
75
views
How to get Interventation/Image after Resize in Laravel
I used Interventation image to resize a big size uploaded image. But I don't want to save it into the local directory of Laravel. This is my sample source code.
public function Uploader(Request $...
0
votes
1
answer
46
views
intervention/image error when capture with mobile camera
When i uploaded image to my website from capture image from mobile camera no from the gallery
and it say " Image source not readable"
this is my code
$fileName = create_random_name() . '....
0
votes
1
answer
285
views
ANCOVA with all continuous variables
I have the following variables:
Psychological trait data collected at pre- and post-intervention
Fitness data (e.g., weight in kg), collected at pre- and post-intervention
I am interested in seeing ...
0
votes
0
answers
47
views
Check if picture has white background
How can I detect if a picture has a white background or not using Intervention.
My project is using a lot of picture which are either from studio in a white lab environment, or lifestyle nature images....
-1
votes
1
answer
363
views
GD Library extension not available with this PHP installation -- when using Intervention Image [duplicate]
Controller File:
use Image;
if ($request->file('dp')) {
$image = $request->file('dp');
$img_name = hexdec(uniqid('', true)).'.'.$image->getClientOriginalExtension();
...
0
votes
2
answers
368
views
laravel picture gallery optimisation
I have photo gallery page, which shows all files from given directory.
I have following logic of handling pictures:
original pictures I keep inside storage/app/img
using console command and ...
0
votes
1
answer
62
views
Is it good to use cache and clone instead of only clone in Image Intervention?
I want to make different sizes of an image. Is it good to cache the file and clone it for generating different sizes? Or no different if I use only clone (without cache)?
Without cache:
$image->...
0
votes
1
answer
1k
views
Laravel Intervention - Unable to init from given binary data
I am using "intervention/image": "^2.5" in one of my projects. It is working well except for one part of the code where im retrieving an image.
I keep getting a Unable to init from ...
1
vote
0
answers
1k
views
Is it possible to compress PNGs like tinyPNG/PngQuant with Php-gd/imagemagick/intervention?
Is it possible to compress PNGs with results similar to TinyPNG/PngQuant in regards to size reduction and quality retention, using vanilla PHP tools like PHP/GD, PHP/Imagemagick and/or intervention/...
0
votes
1
answer
43
views
Why the value of my variable keep changing in this function?
In my understanding of the code below, the value of $image should be always the same (original value passed to the function), but surprisingly for me it keeps changing (the value of the first dd() is ...
0
votes
1
answer
424
views
Resizing from 4764px to 960px with php gd or imagemagick creates image of similiar size in KBs (970kb vs 802kb)
I am trying to resize an 4764 × 2680 pixels image to a 960px width image preserving it's aspect ratio. When doing this operation directly with Imagemagick command line tools, the output image would be ...
0
votes
0
answers
347
views
How to use text stroke effect in image intervention?
I am using the Image Intervention package to print text on image. But I want this kind of stroke to be the same as this sample image. How to do that?
https://prnt.sc/sIpJBJNzwQhF
2
votes
1
answer
2k
views
resize and Crop image with intervention/image
I want to resize crop image like below :
if image is lower than 500x400, scale up and crop,
also if image is higher, scale down and crop.
i used some resize, canvas, fit and other functions but ...
2
votes
2
answers
9k
views
Auth guard [api] is not defined
I checked several questions with the same error above I mentioned. But couldn't find the answer.
I'm trying to turn my base64 string into an image file.
Here is the code in my controller,
public ...
2
votes
2
answers
2k
views
Is it possible to set quality in Image Intervention for WebP images?
I want to convert jpg to webp and set the quality to 50 (as an example). But the Image Intervention only supports the quality parameter only for jpg files.
quality (optional)
Define the quality of ...
0
votes
2
answers
479
views
Image resizing not working with Intervention image Package
The photo is saved, but without resizing, the original photo is actually saved
protected function uploadImage($images = '') {
$path = 'upload/images';
if (request()->hasFile('image') &&...
2
votes
1
answer
835
views
Saving Images in two size in Laravel Livewire
I have a form where I upload images using Laravel Livewire.
In my class I can save the files in original size using:
$filenames = collect($this->photos)->map->store('posts');
The issue that ...
3
votes
2
answers
1k
views
Write right-to-left text on images with Intervention Image
I Want to write some Persian or Arabic text on an image. I used the Intervention Image package for doing that, but the text was generated in reverse. How can I have the text placed in the correct (...
0
votes
1
answer
619
views
Watermark Font Text Overlay Sizing issue with Laravel 8
Using Demo file from https://www.positronx.io/laravel-add-text-overlay-watermark-on-image-tutorial/
Have Installed Intervention/Image and config/app.php along with routes all working fine.
It will ...
1
vote
0
answers
349
views
ImageMagick module not available with this PHP installation on MacOS Big Sur
i have installed ImageMagick in my mac book by using home brew, when i search that imageMagick is available in my mac book, the below are search results screenshot.
i am using image intervention ...
0
votes
1
answer
573
views
Image file size increases when uploading to the server
I am using the Intervention\Image package for laravel
Here are my image upload functions, the first is a regular upload, the second is a resize
public function saveImage(Request $request, $...