You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the news modules already provide the actual path to the image file via the singleSRC variable of the template, a small optimization can be done in collectNewsImages :). This code:
Are you sure the query is executed? The model should be already there in the model registry.
I haven't checked, but you are right of course, the result could already be in the model registry.
Are you sure that $objTemplate->singleSRC contains the path to full image and not to the thumbnail?
Yes, $objTemplate->singleSRC always contains the path to the full image (i.e. the image selected in your news entry), while $objTemplate->src contains the path to the thumbnail (or in Contao 3.4.x and onwards it is stored within $objTemplate->picture iirc).
Since the news modules already provide the actual path to the image file via the
singleSRC
variable of the template, a small optimization can be done incollectNewsImages
:). This code:could be replaced by
and thus saves a database query.
The text was updated successfully, but these errors were encountered: