I'm saving an Image when creating a post in my controller using the code below:
$post->addMedia($file)->withResponsiveImages()->toMediaCollection();
And displaying the responsive images in my blade file with:
{{ $post->getFirstMedia() }}
This works and I get the responsive images in a srcset attribute.
Is it possible to display responsive backround images using the libray?
Related
I am using Laravel 8.0.
Many email providers do not support box-shadow peroperty of CSS. Therefore as a work around, I'm loading images with box-shadow.
This is the image I'm loading from skillshare website and when I use direct link in my blade email template, this image is loaded correctly and that's how it looks.
But then I decided to save this image in my S3 bucket and serve it through CDN, in that case Gmail not showing the box-shadow of the image but rather it is being displayed as black background as below.
I viewed the same email at https://temp-mail.org/, and the imaged loaded correctly here.
My issue is related Gmail and occures when image is loaded from S3 bucket.
I need to render my CKEditor Data on my web page but it's not happening as I am using vuejs, which does not refresh the page it just replaces the components.
My CKEditor data also contain MathML Formulas.
Need to load it dynamically from the rest API.
Example of data that is stored as the output of CKEditor
<p><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow><mn>2</mn></msup><mo>=</mo><msup><mi>a</mi><mrow><mn>2</mn></mrow></msup><mo>+</mo><mn>2</mn><mi>a</mi><mi>b</mi><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></math></p>
rendering MathML can be done using the CDN
https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
but this thing works on page refresh and because VueJS is SPA it does not work there.
I want to render the formula in my , not in the CKEditor.
I have got the formula mentioned as an output of CKEditor but now want to display it on a normal webpage of vuejs
I am facing one issue.Instead of displaying web page in laravel It is displaying like image in text which is attached by me.
I have a Laravel 6 app and am using laravel-domPDF elsewhere in my app just fine. However, I want to create a PDF from a section of the view page. I have the HTML I need rendered-out stored in a variable, but the code to render out the HTML is PHP and I can't execute PHP from a button on the view page without a reload of the page, which loses the variable.
I have a controller just to render out the HTML, but can't find a way to pass that large HTML string to the controller from the view. I can't pass it via a route as it sends the HTML as a parameter attached to the URL and apart from looking terrible, it doesn't work.
How can I get a section of HTML in my view into the following PHP to render the PDF using a button on my view?
$pdf = App::make('dompdf.wrapper');
$pdf->loadHTML($table_html_pdf);
return $pdf->stream();
I'm planning to modernize the photo gallery on my website. Currently I use the Colorbox plugin to open the large image and legend in a lightbox after clicking on a thumbnail. Google indexes the pictures and legends yet optimal.
My new photo gallery should be responsive and I want to show not only the photo and legend inside of the lightbox, but also further information like date, location, camera, tags, etc. That's why I will use the Ajax option rather than the standard gallery option of the lightbox plugin.
The thumbnails are compiled dynamically based on filtering and sorting settings and the information about the photos is stored in a database. So I will use a PHP script to get the necessary information and to set up the HTML code for the Ajax call dynamically. That should be no problem.
My question is: Will the contents that is loaded via Ajax in the Magnific Popup be indexed by Google?
Unfortunately I do not think so, because if I make a Google search for a part of the text which is displayed in the Ajax Lightbox on http://dimsemenov.com/plugins/magnific-popup/, this page does not appear in the Google results...
Is there a solution? Or can you recommend another responsive Lightbox wherein the Ajax content will be indexed?
Thank you for any suggestion!
Michelle