I am trying to implement Retina.js plugin for displaying alternate images on retina display. This will certainly work if I have a fixed image path hardcoded into the page or theme but how do I make this work through the Image block? Or is there a better alternative to this?
Concrete5: How to display retina image through the image block?
298 Views Asked by user1448031 At
1
There are 1 best solutions below
Related Questions in CONCRETE5
- Concrete5 5.7 Block permissions
- concrete5 create password hash that is comparable to stored value
- Concrete 5 Email Sending issue to Google App
- Redactor editor not saving in Concrete 5.7.3.1
- Concrete5 import JS or CSS in single page
- Concrete5.8 how to make tranlsation of the database values?
- Get user data in package controller in Concrete 5.7
- Overwrite Authentication Type's form.php in a Package
- Change caching location Concrete 5.7
- Concrete5.8 Express Object could not be converted to String
- Class Not Found Error with custom Class Concrete5.8
- concrete5 how to access block parameter in controller
- concrete5 CMS cannot parse PATH_INFO information from my server
- How to make concrete5 a 3-tier application?
- Concrete5 MVC parent::save() having trouble finding database insert function, how to save to database
Related Questions in CONCRETE5-5.7
- Concrete5 5.7 Block permissions
- Redactor editor not saving in Concrete 5.7.3.1
- Concrete5 import JS or CSS in single page
- Overwrite Authentication Type's form.php in a Package
- How to make TinyMCE (Rich Text Editor) the default C5 editor
- Concrete5 banned admin
- unable to add single page on concrete5
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) for Concrete5.7.5.1
- Unable to enable crypto on TCP connection
- How can I extend the default session duration in Concrete 5.7?
- Generate a "Logout" link in Concrete 5.7
- How do I perform a redirect in Concrete 5.7?
- How can I apply different CSS styling for admin users in Concrete 5.7?
- Can I easily override the translation of a word in my Concrete 5.7 theme?
- Mixed Content Warning with SSL on Concrete5
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
That library sounds a little heavy handed in just pinging your server for every single image. However, if you include it in the page it should work just fine.
One thing to keep in mind is that by default concrete5 uses the
<picture>tag to output from the image block. Any library you use should have compatibility with that tag.If you end up using a library that requires you output the image differently, I'd recommend creating a custom
\Concrete\Core\Html\Imagesubclass and binding it to the container in you/application/bootstrap/app.phpfile: