<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TITAS MALLICK</title>
    <description>The latest articles on DEV Community by TITAS MALLICK (@titasmallick).</description>
    <link>https://dev.to/titasmallick</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1054900%2Fb49419ce-076b-4e0f-bf31-79a20f335f19.jpeg</url>
      <title>DEV Community: TITAS MALLICK</title>
      <link>https://dev.to/titasmallick</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/titasmallick"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>TITAS MALLICK</dc:creator>
      <pubDate>Wed, 04 Feb 2026 04:31:45 +0000</pubDate>
      <link>https://dev.to/titasmallick/-2257</link>
      <guid>https://dev.to/titasmallick/-2257</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/titasmallick" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1054900%2Fb49419ce-076b-4e0f-bf31-79a20f335f19.jpeg" alt="titasmallick"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/titasmallick/bionotes-making-quality-biology-education-accessible-to-all-students-class-5-12-5070" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;BioNotes: Making Quality Biology Education Accessible to All Students (Class 5-12)&lt;/h2&gt;
      &lt;h3&gt;TITAS MALLICK ・ Feb 4&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#science&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#nextjs&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#opensource&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>science</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>BioNotes: Making Quality Biology Education Accessible to All Students (Class 5-12)</title>
      <dc:creator>TITAS MALLICK</dc:creator>
      <pubDate>Wed, 04 Feb 2026 04:29:06 +0000</pubDate>
      <link>https://dev.to/titasmallick/bionotes-making-quality-biology-education-accessible-to-all-students-class-5-12-5070</link>
      <guid>https://dev.to/titasmallick/bionotes-making-quality-biology-education-accessible-to-all-students-class-5-12-5070</guid>
      <description>&lt;p&gt;As a biology teacher with over 10 years of experience, I've seen countless students struggle to find comprehensive, well-organized study materials that actually match their curriculum. Textbooks are dense, online resources are scattered, and quality notes are often locked behind paywalls. This frustration led me to create &lt;strong&gt;BioNotes&lt;/strong&gt; — a completely free, open-source biology education platform that's changing how students learn biology.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is BioNotes?
&lt;/h2&gt;

&lt;p&gt;BioNotes is a comprehensive digital repository of biology notes, study materials, and resources designed specifically for students from Class 5 to Class 12. It's aligned with major Indian curricula including ICSE, ISC, CBSE, and CISCE, making it relevant for millions of students across the country.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔗 Visit BioNotes: &lt;a href="https://bionotes-liard.vercel.app/" rel="noopener noreferrer"&gt;https://bionotes-liard.vercel.app/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With over &lt;strong&gt;400+ study materials&lt;/strong&gt; available and growing, the platform covers everything from basic cell biology to advanced genetics and biotechnology.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem I Wanted to Solve
&lt;/h2&gt;

&lt;p&gt;During my years of teaching, I noticed several recurring problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scattered Resources&lt;/strong&gt;: Students waste hours searching multiple websites for reliable information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curriculum Mismatch&lt;/strong&gt;: Generic content often doesn't align with what students actually need for exams&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Barriers&lt;/strong&gt;: Quality study materials are expensive, excluding students from economically disadvantaged backgrounds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Practice&lt;/strong&gt;: Finding good question banks for specific chapters is surprisingly difficult&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Practical Confusion&lt;/strong&gt;: Students often struggle with laboratory procedures and experiment guidelines&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;BioNotes addresses all of these challenges in one centralized, free platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features That Make BioNotes Special
&lt;/h2&gt;

&lt;h3&gt;
  
  
  📚 Class-wise Organized Content
&lt;/h3&gt;

&lt;p&gt;Instead of dumping everything into one massive library, BioNotes organizes materials by class level (5-12). This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Students find exactly what they need for their current academic year&lt;/li&gt;
&lt;li&gt;Content difficulty matches the student's learning stage&lt;/li&gt;
&lt;li&gt;No overwhelming information overload&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔬 Comprehensive Coverage
&lt;/h3&gt;

&lt;p&gt;The platform covers eight major biology domains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cell Biology&lt;/strong&gt;: From basic cell structure to complex cellular processes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plant Physiology&lt;/strong&gt;: Photosynthesis, respiration, plant hormones, and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Animal Physiology&lt;/strong&gt;: Digestive, circulatory, nervous systems, and beyond&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Genetics &amp;amp; Evolution&lt;/strong&gt;: Heredity, DNA, natural selection, and evolutionary biology&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecology&lt;/strong&gt;: Ecosystems, biodiversity, and environmental science&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human Health&lt;/strong&gt;: Diseases, immunity, and wellness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproduction&lt;/strong&gt;: Reproductive systems and developmental biology&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Biotechnology&lt;/strong&gt;: Modern applications and genetic engineering&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ❓ Question Banks
&lt;/h3&gt;

&lt;p&gt;Each topic comes with chapter-wise practice questions, making exam preparation straightforward and targeted. No more hunting through multiple sources for relevant questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎯 Competitive Exam Ready
&lt;/h3&gt;

&lt;p&gt;While designed for school curricula, BioNotes also serves as excellent preparation material for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NEET&lt;/strong&gt; (National Eligibility cum Entrance Test)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Biology Olympiads&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Other competitive examinations requiring strong biology fundamentals&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎞️ Interactive Slides
&lt;/h3&gt;

&lt;p&gt;Beyond static notes, BioNotes includes topic-wise presentation slides (&lt;a href="https://bionotes-slides.netlify.app/" rel="noopener noreferrer"&gt;view here&lt;/a&gt;), perfect for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visual learners who prefer diagrams and flowcharts&lt;/li&gt;
&lt;li&gt;Teachers looking for ready-to-use classroom presentations&lt;/li&gt;
&lt;li&gt;Quick revision before exams&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who Can Benefit from BioNotes?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  👨‍🎓 Students (Classes 5-12)
&lt;/h3&gt;

&lt;p&gt;Access high-quality, curriculum-aligned study materials without spending a rupee. Whether you're preparing for board exams, competitive tests, or just want to understand biology better, BioNotes has you covered.&lt;/p&gt;

&lt;h3&gt;
  
  
  👩‍🏫 Teachers
&lt;/h3&gt;

&lt;p&gt;Save hours of preparation time with ready-to-use content. Use the slides for classroom teaching, assign question banks for homework, or recommend specific chapters to students who need extra help.&lt;/p&gt;

&lt;h3&gt;
  
  
  👨‍👩‍👧‍👦 Parents
&lt;/h3&gt;

&lt;p&gt;Support your child's home learning with reliable resources. No expertise in biology? No problem — the notes are clear, structured, and easy to follow.&lt;/p&gt;

&lt;h3&gt;
  
  
  🏆 Competitive Exam Aspirants
&lt;/h3&gt;

&lt;p&gt;Build a rock-solid foundation in biology concepts essential for NEET and Olympiad success.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technology Behind BioNotes
&lt;/h2&gt;

&lt;p&gt;For the developers and tech enthusiasts reading this, here's what powers BioNotes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: Built with modern web technologies for a fast, responsive experience&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting&lt;/strong&gt;: Deployed on Vercel for reliable, global access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source&lt;/strong&gt;: Available on &lt;a href="https://github.com/titasmallick/BioNotes" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; for transparency and community contributions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Management&lt;/strong&gt;: Structured documentation approach for easy updates and maintenance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire platform is designed with performance and accessibility in mind, ensuring students with varying internet speeds can access the content smoothly.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Vision for Education
&lt;/h2&gt;

&lt;p&gt;As an M.Sc. Botany graduate, B.Ed. qualified, and CTET certified teacher, I believe that &lt;strong&gt;quality education should never be a privilege&lt;/strong&gt;. Every student, regardless of their economic background or geographic location, deserves access to excellent learning materials.&lt;/p&gt;

&lt;p&gt;BioNotes is my contribution to democratizing education. It's built on the principle that knowledge shared is knowledge multiplied.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next for BioNotes?
&lt;/h2&gt;

&lt;p&gt;The platform is continuously evolving. Here's what's in the pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expanded content library with more topics and depth&lt;/li&gt;
&lt;li&gt;Video explanations for complex concepts&lt;/li&gt;
&lt;li&gt;Interactive quizzes with instant feedback&lt;/li&gt;
&lt;li&gt;Mobile app for offline access&lt;/li&gt;
&lt;li&gt;Community forum for student discussions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How You Can Help
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Spread the Word&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Share BioNotes with students, teachers, parents, and anyone who might benefit. A single share could transform someone's learning journey.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Contribute Content&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Are you a biology teacher or subject expert? Consider contributing notes, questions, or corrections. Check out the &lt;a href="https://github.com/titasmallick/BioNotes" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; to get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Provide Feedback&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;User feedback drives improvement. Let me know what works, what doesn't, and what you'd like to see added.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Support the Mission&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you're a developer, help improve the platform's code. If you're an educator, help expand the content library. If you're a student, help us understand what you really need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Join the BioNotes Community
&lt;/h2&gt;

&lt;p&gt;Whether you're a struggling student looking for clear explanations, a teacher seeking quality resources, or simply someone passionate about biology education, BioNotes welcomes you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Start Your Biology Learning Journey Today:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Main Platform&lt;/strong&gt;: &lt;a href="https://bionotes-liard.vercel.app/" rel="noopener noreferrer"&gt;https://bionotes-liard.vercel.app/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Presentation Slides&lt;/strong&gt;: &lt;a href="https://bionotes-slides.netlify.app/" rel="noopener noreferrer"&gt;https://bionotes-slides.netlify.app/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/titasmallick/BioNotes" rel="noopener noreferrer"&gt;https://github.com/titasmallick/BioNotes&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Creating BioNotes has been a labor of love, driven by a simple belief: every student deserves access to excellent education. With over 400 study materials already available and many more to come, we're just getting started.&lt;/p&gt;

&lt;p&gt;The platform is completely free, with no ads, no premium tiers, and no hidden costs. It's education the way it should be — accessible, comprehensive, and focused entirely on learning.&lt;/p&gt;

&lt;p&gt;Join thousands of students who are already benefiting from BioNotes. Whether you're in Class 5 just beginning your biology journey or in Class 12 preparing for NEET, there's something here for you.&lt;/p&gt;

&lt;p&gt;Let's make biology education accessible to everyone, together.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;About the Author: I'm Titas Mallick, a biology teacher with an M.Sc. in Botany, B.Ed., CTET qualification, and over 10 years of teaching experience. I created BioNotes to make quality biology education free and accessible to all students. Connect with me through the links above.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#Biology #Education #OpenSource #Learning #NEET #Students #Teaching #EdTech #FreeEducation #India&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>science</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Digital Invitations &amp; AI: A Small Effort to Make Wedding Planning a Bit Easier</title>
      <dc:creator>TITAS MALLICK</dc:creator>
      <pubDate>Sat, 03 Jan 2026 06:58:12 +0000</pubDate>
      <link>https://dev.to/titasmallick/digital-invitations-ai-a-small-effort-to-make-wedding-planning-a-bit-easier-5d28</link>
      <guid>https://dev.to/titasmallick/digital-invitations-ai-a-small-effort-to-make-wedding-planning-a-bit-easier-5d28</guid>
      <description>&lt;p&gt;Weddings are beautiful, but they can also be incredibly overwhelming. Between managing guest lists, answering the same questions about venues a hundred times, and trying to keep everyone updated, the "joy" of planning can sometimes feel like a second job.&lt;/p&gt;

&lt;p&gt;While preparing for my own journey, I realized that most digital invitations were just static pages that didn't really solve these problems. I wanted to build something that could actually help—both the couple and their guests. What started as a personal project evolved into &lt;strong&gt;next-wedding-generator&lt;/strong&gt;, a small CLI tool I’ve shared on NPM to help others scaffold their own interactive wedding sites.&lt;/p&gt;




&lt;h2&gt;
  
  
  🍃 Why a "Generator"?
&lt;/h2&gt;

&lt;p&gt;I know how busy things get. Most of us don't have weeks to code a custom site from scratch. My goal was to create a "Quick Start" foundation. By running a single command, you get a full Next.js application that is already set up with the features I found most useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤖 Bringing in a Helping Hand: AI Concierge
&lt;/h2&gt;

&lt;p&gt;The most helpful part of this project, in my humble opinion, is the AI integration. By using &lt;strong&gt;Google Gemini 2.5-flash&lt;/strong&gt;, I've included a simple floating assistant. &lt;/p&gt;

&lt;p&gt;It’s not just a chatbot; it’s a way to give your guests instant answers. Once you provide it with your wedding details, it can tell guests where to park, what time the snacks are served, or even share a bit about the couple's story. It's a small way to ensure no guest feels lost.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Some Features I Thought Might Help:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Personalized Links&lt;/strong&gt;: I wanted every guest to feel special. The system generates unique IDs so guests only see the events they are invited to.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Digital Guestbook&lt;/strong&gt;: A place for friends to share photos from their phones directly to a masonry wall (via Cloudinary).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;A Shared Playlist&lt;/strong&gt;: A simple queue where guests can request the songs they want to dance to at the reception.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Admin Control&lt;/strong&gt;: A basic dashboard to manage the guest list and track RSVPs without needing to look at complex databases.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ The Simple Tech Behind It
&lt;/h2&gt;

&lt;p&gt;I chose these tools because they are reliable and relatively easy to set up for anyone with a bit of web knowledge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Next.js &amp;amp; HeroUI&lt;/strong&gt;: For a clean, modern look that works well on mobile.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Firebase&lt;/strong&gt;: To handle real-time wishes and RSVPs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Resend&lt;/strong&gt;: For those helpful "day-before" email reminders.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 How to Use It (If You’d Like)
&lt;/h2&gt;

&lt;p&gt;If you or a friend are planning a wedding, feel free to try it out. It’s a simple process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Generate&lt;/strong&gt;: Run &lt;code&gt;npx next-wedding-generator&lt;/code&gt; in your terminal.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Setup&lt;/strong&gt;: Fill in your own API keys in the &lt;code&gt;.env&lt;/code&gt; file (I’ve included a guide in the README).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Personalize&lt;/strong&gt;: Swap the placeholder photos in the &lt;code&gt;public&lt;/code&gt; folder with your own.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📜 Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;I'm still learning, and this tool is just a small contribution to the community. My hope is that it saves a few couples some stress and adds a little bit of digital magic to their big day. &lt;/p&gt;

&lt;p&gt;If you find it useful, or have ideas on how to make it better, I’d love to hear from you. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explore the Project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  📦 &lt;strong&gt;NPM&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/next-wedding-generator" rel="noopener noreferrer"&gt;next-wedding-generator&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  💻 &lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/titasmallick/wedding-site-gen" rel="noopener noreferrer"&gt;titasmallick/wedding-site-gen&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wishing you a stress-free and beautiful celebration! 💍✨&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>heroui</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Google's New Open-Source LLM Gemma: A Speed Comparison</title>
      <dc:creator>TITAS MALLICK</dc:creator>
      <pubDate>Mon, 26 Feb 2024 05:30:39 +0000</pubDate>
      <link>https://dev.to/titasmallick/googles-new-open-source-llm-gemma-a-speed-comparison-4kd2</link>
      <guid>https://dev.to/titasmallick/googles-new-open-source-llm-gemma-a-speed-comparison-4kd2</guid>
      <description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=CyoS5UyCQnI&amp;amp;ab_channel=Titas"&gt;Watch The Video here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8wx3x5hkdy9bqd5tblu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8wx3x5hkdy9bqd5tblu.jpeg" alt="Gemma Vs. Llama2" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Google has recently introduced its latest open-source language model, LLM Gemma, promising faster performance and efficiency. In this blog post, we will delve into a side-by-side comparison of Gemma with two billion tokenizers and Meta's Llama 2 with seven billion tokenizers. Both models are considered as the base models and are being tested locally on the author's personal computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed Test Results
&lt;/h2&gt;

&lt;p&gt;Upon testing Gemma and Llama 2, it became evident that Gemma outperformed Llama 2 in terms of speed and efficiency. Gemma completed the task at hand much quicker, showcasing its superior capabilities in handling language processing tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resource Consumption
&lt;/h2&gt;

&lt;p&gt;To further analyze the performance of both models, we looked into how they stress the CPU during operation. A comparison between Llama 2 and Gemma unveiled that Gemma is not only faster but also more lightweight and less resource-intensive, making it a more efficient choice for processing language tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visualization
&lt;/h2&gt;

&lt;p&gt;For a visual representation of the speed and resource consumption differences between Llama 2 and Gemma, we encourage you to refer to the time-coded video footage provided. The visuals clearly depict Gemma's dominance in terms of speed and efficiency.&lt;/p&gt;

&lt;p&gt;Google's Gemini Gemma has made a significant mark in the realm of language models with its impressive performance metrics. What are your thoughts on Google's latest offering? Share your opinions in the comments section below.&lt;/p&gt;

</description>
      <category>gemma</category>
      <category>llama2</category>
      <category>ai</category>
    </item>
    <item>
      <title>How to generate dynamic OG image using new NextJs with App directory</title>
      <dc:creator>TITAS MALLICK</dc:creator>
      <pubDate>Wed, 29 Mar 2023 18:20:17 +0000</pubDate>
      <link>https://dev.to/titasmallick/how-to-generate-dynamic-og-image-using-new-nextjs-with-app-directory-4bcn</link>
      <guid>https://dev.to/titasmallick/how-to-generate-dynamic-og-image-using-new-nextjs-with-app-directory-4bcn</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AN API THAT YOU CAN USE NOW TO DO THE FETCHING AT ONCE&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://randomimagedesc.creativegunfilms.workers.dev/" rel="noopener noreferrer"&gt;https://randomimagedesc.creativegunfilms.workers.dev/&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//It will return something like this
{
  "id": 539,
  "imageURL": "https://picsum.photos/id/539/300",
  "description": "a black and white photo of some windows",
  "apiCreator": "Titas",
  "timestamp": 1680238902543
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OG or opengraph images are important tool for improving website SEO. Most of the time we use a static image generally placed inside the 'public' directory and link it to the index.html or jsx if we are using React or NextJs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Hello world&amp;lt;/title&amp;gt;
  &amp;lt;meta
    property="og:image"
    content="https://domainname.tld/fieName.jpg"
  /&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But sometime it is required to dynamically generate this og images. Use cases may include dynamic routes or dynamic product pages for an ecommerce site. If you are building your app using NextJs and planned to host that in Vercel, then vercel has a very good tool to cover you. 'Vercel Open Graph (OG) Image Generation', it does the same, it allows you to use an Api endpoint to fetch data if required and then dynamically create the og image at request time.&lt;br&gt;
But the vercel documentation covers it's implementation using NextJs with older 'Page' or 'src/pages' folder structure. Where there is an dedicated 'Api' folder to handle api requests.&lt;br&gt;
But it still doesn't covers how to implement the same feature using newly announce 'App' folder that replaces the older 'Pages' folder in version 13. In NextJs Beta Docs it is clearly mentioned that '/Api' is not supported inside the 'App' directory, though NextJs allows you to incrementally update to the newer structure and 'Pages' directory will be supported alongside the 'App' directory, it is good to know how to implement og image generation when using NextJs v13 or above using only 'App' directory.&lt;br&gt;
Start with creating a new NextJs project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-next-app@latest
# or
yarn create next-app
# or
pnpm create next-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the following options&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;? Would you like to use `src/` directory with this project? »** No** / Yes
// Select "NO"
? Would you like to use experimental `app/` directory with this project? » No / **Yes**
// Select "YES"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now locally run your project using &lt;code&gt;npm run dev&lt;/code&gt; and open the vscode using &lt;code&gt;code .&lt;/code&gt;.&lt;br&gt;
You will be represented with the 'App' directory instead of the 'Pages' or 'src/Pages' directory. And obviously there is no 'Api' directory inside the 'App' directory.&lt;br&gt;
the 'layout.js' handles the layout obviously and 'page.js' is where you will write the codes for the index page of your app.&lt;br&gt;
Please look into the NextJs Beta documentation to understand how the actual routing works in the new NextJs.&lt;br&gt;
Now while 'Api' is gone, we now have 'route.js'. It can be present inside any route. But that route must not contain any 'Page.js'. Say for example create a folder, name it 'ogimage' inside the 'App', and place 'route.js' inside the folder. The 'route.js' acts as the route handler for that particular route. Please look into the route handler section in the NextJs Beta Docs. This route handler is now accessible through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3000/ogimage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 'route.js' inside a directory, here 'App/ogimage/route.js' receives the request from the client and send responses.&lt;br&gt;
Where 'page.js' returns the rendered html the 'route.js' is supposed to send responses in form of json or other formats just like the api used to do.&lt;br&gt;
Write the following code to test your route handler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export async function GET(request) {
    return new Response('Hello, World!');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Refresh your browser, you will se 'Hello, World!' coming from your route handler.&lt;br&gt;
Now install the vercel og image library to your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @vercel/og
or
yarn add @vercel/og 
or
pnpm i @vercel/og 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;import the library in your 'route.js'.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export async function GET(request) {
   return  new ImageResponse(
      (
        &amp;lt;div
          style={{
            fontSize: 128,
            background: 'white',
            width: '100%',
            height: '100%',
            display: 'flex',
            textAlign: 'center',
            alignItems: 'center',
            justifyContent: 'center',
          }}
        &amp;gt;
          Hello world!
        &amp;lt;/div&amp;gt;
      ),
      {
        width: 1200,
        height: 600,
      },
    );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here you are returning an ImageResponse instead of the Response, alternatively you can also extend the request and response web api using 'NextRequest' and 'NextRespone', to do that you can import them using &lt;code&gt;import { NextResponse, NextRequest } from 'next/server';&lt;/code&gt;, though for this example it is not required. Now if you refresh your browser you will get an image generated by your 'route.js' at request time.&lt;br&gt;
Well we are almost done. You can render whatever dynamic data in your image you want and customize your image using &lt;a href="https://og-playground.vercel.app/" rel="noopener noreferrer"&gt;og playground&lt;/a&gt;, you can even generate 'SVG' on request as the og image.&lt;br&gt;
For this example we will fetch a random number from &lt;a href="https://www.random.org" rel="noopener noreferrer"&gt;random.org api&lt;/a&gt;, then we will use that number as an id and fetch an image from &lt;a href="https://picsum.photos" rel="noopener noreferrer"&gt;Lorem Picsum&lt;/a&gt;, with the same image url we will fetch the description for the image from the &lt;a href="https://alt-text-generator.vercel.app/" rel="noopener noreferrer"&gt;Alt Image Generator&lt;/a&gt; and generate an image on request with the image that we fetched and the description we have fetched and use it in a design to create the og image. Kind of like that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzthi7ajtojwwmxw8dio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzthi7ajtojwwmxw8dio.png" alt="Generated Image by this method" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So first inside our async GET function we generate a random id:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Inside 'App/ogimage/route.js'
let randomdid;
    const getRandom = await fetch(
      'https://www.random.org/integers/?num=1&amp;amp;min=0&amp;amp;max=1083&amp;amp;col=1&amp;amp;base=10&amp;amp;format=plain',
      { mode: 'no-cors', next: { revalidate: 10 } },
    );
    const numbget = await getRandom.json();
    randomdid = numbget || Math.floor(Math.random() * 1083);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are fetching a random integer between 0 - 1083 (as we found lorem picsum provides 1084 images), the 'revalidate: 10' is to tell the server to revalidate the fetch in every 10 seconds if another request is received.&lt;br&gt;
Now we will fetch the image from the lorem picsum by using the random id as the photo id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var = URL;
 const imagef = await fetch(`https://picsum.photos/id/${randomdid}/info`, {
      next: { revalidate: 10 },
    });
    const imageD = await imagef.json();
    URL = `https://picsum.photos/id/${imageD.id}/300`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could have fetched the whole image and could have used the method 'await res.blob()' but we found it unnecessarily slows the process. So this step can be skipped. &lt;br&gt;
Now, we will fetch the description of the image from Alt Text Generator by passing the image url as a parameter like the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var fetchdesc;
const res = await fetch(
      `https://alt-text-generator.vercel.app/api/generate?imageUrl=https://picsum.photos/id/${randomdid}/300`,
      { mode: 'no-cors', next: { revalidate: 10 } },
    );
    fetchDesc = await res.json();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will wrap the whole fetching thing inside a 'try catch' block and handle any error.&lt;br&gt;
Now we have the url of the image that we want to show, as well as the description.&lt;br&gt;
Alternatively you can use &lt;strong&gt;&lt;a href="https://randomimagedesc.creativegunfilms.workers.dev/" rel="noopener noreferrer"&gt;OUR API&lt;/a&gt;&lt;/strong&gt; to do the complete fetching at once.&lt;br&gt;
Just fetch &lt;code&gt;https://randomimagedesc.creativegunfilms.workers.dev/&lt;/code&gt;&lt;br&gt;
It will return a JSON response like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "id": 232,
  "imageURL": "https://picsum.photos/id/232/300",
  "description": "a street light in the snow at night",
  "apiCreator": "Amit Sen",
  "randomQ": "Be polite to all, but intimate with few.",
  "qAuthor": "Thomas Jefferson",
  "c": "Extend Alt Text",
  "u": "https://extend-alt-text.vercel.app/",
  "g": "https://github.com/creativegunfilms/ExtendAltText.git",
  "timestamp": 1680252198911
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using this API, the fetch can be now done like that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export async function GET(request) {
  //..
  let data;
  try {
    const fetchData = await fetch(
      'https://randomimagedesc.creativegunfilms.workers.dev/',
      { mode: 'no-cors', cache: 'no-store' },
    );
    data = await fetchData.json();
  } catch (error) {
    //Using Fallback to narrow error boundary
    //...
  }

  return new ImageResponse(
    //...
    // You can now use {data.imageURL} and {data.description} here.
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anyway, now We will construct the og image inside the returned ImageResponse like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return new ImageResponse(
    (
      &amp;lt;div
        style={{
          height: '100%',
          width: '100%',
          display: 'flex',
          flexDirection: 'column',
          alignItems: 'center',
          justifyContent: 'center',
          backgroundColor: '#fff',
          fontSize: 32,
          fontWeight: 600,
        }}
      &amp;gt;
        &amp;lt;div
          style={{
            left: 42,
            top: 42,
            position: 'absolute',
            display: 'flex',
            alignItems: 'center',
          }}
        &amp;gt;
          &amp;lt;span
            style={{
              width: 24,
              height: 24,
              background: 'black',
            }}
          /&amp;gt;
          &amp;lt;span
            style={{
              marginLeft: 8,
              fontSize: 20,
            }}
          &amp;gt;
            Extend Alt Text
          &amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;img height={300} width={300} src={URL} /&amp;gt;
        &amp;lt;div
          style={{
            fontSize: '20px',
            marginTop: 40,
            background: 'black',
            color: 'white',
            padding: '25px',
            width: '300px',
          }}
        &amp;gt;
          {fetchDesc}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    ),
    {
      width: 1200,
      height: 600,
    },
  );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are done. We have now a dynamically generated og image.&lt;br&gt;
The whole 'route.js' will now look like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { ImageResponse } from '@vercel/og';

export const config = {
  runtime: 'edge',
};

export async function GET(request) {
  console.log(request);
  //Setting the image url
  var URL;
  //Fetch the Alt Text Generator
  let fetchDesc;
  try {
    // Generating random id between 0 - 1083 to get the image
    // let randomdid = Math.floor(Math.random() * 1083);
    let randomdid;
    const getRandom = await fetch(
      'https://www.random.org/integers/?num=1&amp;amp;min=0&amp;amp;max=1083&amp;amp;col=1&amp;amp;base=10&amp;amp;format=plain',
      { mode: 'no-cors', next: { revalidate: 10 } },
    );
    const numbget = await getRandom.json();
    randomdid = numbget || Math.floor(Math.random() * 1083);
    //Fetching the alt text linked to id
    const res = await fetch(
      `https://alt-text-generator.vercel.app/api/generate?imageUrl=https://picsum.photos/id/${randomdid}/300`,
      { mode: 'no-cors', next: { revalidate: 10 } },
    );
    fetchDesc = await res.json();
    //fetching the actual image based on id
    const imagef = await fetch(`https://picsum.photos/id/${randomdid}/info`, {
      next: { revalidate: 10 },
    });
    const imageD = await imagef.json();
    URL = `https://picsum.photos/id/${imageD.id}/300`;
  } catch (error) {
    //Using Fallback to narrow error boundary
    URL = '/fallbackog.jpg';
    fetchDesc = 'Extend Alt Text Can Generate Descriptions';
  }

  return new ImageResponse(
    (
      &amp;lt;div
        style={{
          height: '100%',
          width: '100%',
          display: 'flex',
          flexDirection: 'column',
          alignItems: 'center',
          justifyContent: 'center',
          backgroundColor: '#fff',
          fontSize: 32,
          fontWeight: 600,
        }}
      &amp;gt;
        &amp;lt;div
          style={{
            left: 42,
            top: 42,
            position: 'absolute',
            display: 'flex',
            alignItems: 'center',
          }}
        &amp;gt;
          &amp;lt;span
            style={{
              width: 24,
              height: 24,
              background: 'black',
            }}
          /&amp;gt;
          &amp;lt;span
            style={{
              marginLeft: 8,
              fontSize: 20,
            }}
          &amp;gt;
            Extend Alt Text
          &amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;img height={300} width={300} src={URL} /&amp;gt;
        &amp;lt;div
          style={{
            fontSize: '20px',
            marginTop: 40,
            background: 'black',
            color: 'white',
            padding: '25px',
            width: '300px',
          }}
        &amp;gt;
          {fetchDesc}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    ),
    {
      width: 1200,
      height: 600,
    },
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now refresh your browser you will see newly generated og image each time. Simply made a git commit and let it built on the vercel.&lt;br&gt;
use the link of the route and place it in the &lt;/p&gt; section of your 'layout.js' and your website now has an dynamically generated og image.&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta
    property="og:image"
    content="https://domainname.vercel.app/directoryName"
  /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can test it &lt;a href="https://extend-alt-text.vercel.app/ogimage" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
As the &lt;code&gt;route.js&lt;/code&gt; here is not handelling the incoming request you can send random request parameter to genarate og images in the hosted environment.&lt;/p&gt;

&lt;p&gt;Refreshing &lt;code&gt;http://localhost:3000/ogimage&lt;/code&gt; will generate new og image each time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But refreshing &lt;code&gt;https://extend-alt-text.vercel.app/ogimage&lt;/code&gt; will not generate new og image each time, as it is remaining as cache in the edge, refreshing is not an &lt;code&gt;unique&lt;/code&gt; request.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Passing a request param like &lt;code&gt;https://extend-alt-text.vercel.app/ogimage&lt;/code&gt;&lt;strong&gt;&lt;code&gt;?=[anything_Random_here]&lt;/code&gt;&lt;/strong&gt; will be treated as &lt;code&gt;unique&lt;/code&gt; request and will generate new og image. Now this newly generated image can be cached for 10 second. Sending same parameter again will prompt the cached version of the og image.&lt;br&gt;
The caching parameters are supposted to work like this -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   // Cached until manually invalidated
    fetch(`https://...`),
    // Refetched on every request
    fetch(`https://...`, { cache: 'no-store' }),
    // Cached with a lifetime of 10 seconds
    fetch(`https://...`, { next: { revalidate: 10 } }),
    // Cached
    fetch(`https://...`, { 'only-cache' }),
    // or,
    fetch(`https://...`, { 'force-cache' })
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;_Though after multiple times fiddling with the cache parameters even by setting 'cache-control' headers we didn't experienc any changes in the cache behaviors. At this moment it is safe to assume, may be the Apis are not fully ready yet, thus they are getting overridden forcefully to their default pattern, hopefully in the stable release these might get fixed. _ &lt;br&gt;
Frequently changing og image can influence the SEO, but it is absolutely okay to create Og images dynamically or for dynamic routes. &lt;br&gt;
Handelling &lt;code&gt;request&lt;/code&gt; and &lt;code&gt;request.param&lt;/code&gt; to get the passed value can be used to dynamically add text in the og image by using &lt;code&gt;{request.param}&lt;/code&gt; while structuring SVG in the returned imageResponse.&lt;br&gt;
You can clone our project from &lt;a href="https://github.com/creativegunfilms/ExtendAltText.git" rel="noopener noreferrer"&gt;our github repo&lt;/a&gt;. Our project is called Extend Alt Text and it takes the vercel Alt Text Generator and extends its functionality. It let users upload multiple files at once and generate alt texts in bulk. We can describe how we did that in a separate article.&lt;br&gt;
&lt;strong&gt;By design the 'route.js' here is behaving like an 'edge function' here, which is strategically placed behind the 'edge network cache' inside the vercel infrastructure. So the response cache is automatically stored to reduce network latency. Alternatively middlewares can be placed as the 'edge middleware' which seats infront of the network cache and intercepts network requests before it actually hits the server.&lt;/strong&gt;&lt;br&gt;
Theoretically, we could have used this image generation on the middleware to override this caching behavior alltogether, but the middewares are not designed to run edge functions in them and can induce network latency, it is recommended to use middlewares to geolocate, authenticate and redirect and things like A/B testing.&lt;br&gt;
 &lt;strong&gt;NextJs Beta Document says 'To Do' in the 'middleware' section, it is not clear if it will be supported with the new 'App' directory or not as of now, we have tested implementing middleware with 'App' directory in NextJs Beta V13.2.4, the wrong 'matcher' gives error in the server console but the 'redirect' or 'rewrite' doesn't work as of now. It may change in the future, please look into the docs before you use it.&lt;/strong&gt;&lt;br&gt;
We tried to use edge cache control headers to control the caching behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  return new ImageResponse(
    (...
    ),
    {...
    },
  ), {status: 200, headers: {
    'Cache-Control': 's-maxage=3600',
  }};
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;But with 'ImagResponse' setting up 'cache-control' headers didn't actually work. But it works fine with 'NextResponse'.&lt;/strong&gt;&lt;br&gt;
We will try to implement cache controlling in image generation in a future article.&lt;br&gt;
Thanks for Now.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>serverless</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
