Answer the question
In order to leave comments, you need to log in
How to disable placeholder output in yii2-images?
Hello everybody! Please tell me, maybe someone has already encountered a similar issue, when displaying images using the yii2-images widget using the display all images function getImages()
, provided that the images were not loaded, the placeholder is always displayed, how to make it not displayed?
Answer the question
In order to leave comments, you need to log in
https://github.com/CostaRico/yii2-images/issues/50 - seems like a solution to the problem.
Mikhail Balagura , anyway, the solution in such cases is similar, which is indicated by the link elliot ... We
inherit from yii2-images, look for the place where the placeholder is given, override the method with our own.
If we consider a very special case directly, then now there is such a code:
public function getPlaceHolder(){
if($this->placeHolderPath){
return new PlaceHolder();
}else{
return null;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question