What you will need to do is edit your theme’s functions.php file to add a new image size. Scroll to the bottom and inside the php tags enter:
add_image_size( 'fancybox-full', 800, 9999 );
This will create an uncropped image 800px wide, whenever an image is uploaded.
You will then need to edit the anchor for your images to link to this new image size. Try using wp_get_attachment_image_src() – use fancybox-full as the image size argument, not sure how yours currently gets the attachment ID, so if you need further assitance, let me know.
You will find this doesn’t currently work with the images you have already uploaded. Try using the Regenerate Thumbnails plugin.
Hope this helps.
Related Posts:
- How to generate thumbnails when needed only?
- No Thumbnails Generated
- How to Require a Minimum Image Dimension for Uploading?
- How does WP media uploader create the 3 different sized images, and how can I duplicate it
- Reject upload of wrong-sized images using the Media Uploader
- Create image formats with different qualities when uploading
- Which filters or actions to use after a media upload and delete?
- PNG with transparent background turns black when uploaded and resized
- Settings in ‘Media > Settings’ is ignored when inserting images
- There’s a way to scale media (images) at 50%?
- How to prevent upload of a multiple sizes of images
- How can I prevent uploading bmp image?
- Impose a Maximum Limit on Image height and width upload size
- Force wordpress to see uploads folder media
- Convert uploaded PNG to JPEG automatically
- add_image_size creating lots of images (of various sizes)
- resize images not crop
- Add suffix to filename of uploaded images
- How to link to the image editor’s Edit Image function?
- Regenerate thumbnails after upload
- Front-end Image Upload with Preview – Is this Possible in WP?
- WordPress won’t generate image sizes for certain images
- Thumbnails produce unwanted gray pixels on white background [closed]
- Site icons with alpha channel for self-hosted WordPress blog network
- How can I receive the image id using the media box?
- Can I stop wordpress generating media sizes
- add_image_size() and uploading the exact size leaves 1×1 image in uploads
- Error uploading images (but the images are at the server!)
- How to generate thumbnails when needed only?
- WordPress Media Library showing wrong preview size?
- add_image_size adds size, but doesn’t upload if source resolution is same as resize resolution
- Original image not saving?
- Process uploads with phpThumb before generating thumbnails
- Resize existing library images
- Large image upload size (using timthumb.php
- Image resizing – TimThumb vs convert on upload?
- WordPress Bug on IIS ? Problem when uploading image on IIS 7
- When does WP resize an image file
- Stop image resizing in particular case – is that possible?
- Issue with images which have no sizes available
- How to resize attachement
- Best way to receive special images in posts
- Resize uploaded original images to a minimum automatically
- Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio
- Control resizing of uploaded images
- Images uploaded via Gutenberg image block are cropped
- Set default “Link CSS Class” in add media admin editor
- Images not aligning correctly
- Redimension thumbnail crop without creating new images
- get the post thumbnail returns the full size
- WordPress Image Resize fails without Error Message
- How to force attachment size for every post
- Image Upload from URL
- wp_upload_dir how to get just the directory name .
- Can’t upload media, permissions are correct
- How Can I Organize the Uploads Folder by Slug (or ID, or FileType, or Author)?
- Contact Form 7 – process form using a PHP script, instead of mailing [closed]
- How to register images uploaded via FTP in media library?
- How to validate the file name of the Media File Uploads?
- Frontend image uploading from edit profile page. (goldenapples)
- Check if image exists before uploading with media_sideload_image()
- Plugin to Import Dropbox Files into Media Folder from the Cloud [closed]
- Disable gallery in 3.5 media iframe
- Convert all images to PNG on file upload
- Uploading dwg files to wordpress
- Images not being generated at correct size
- Remove attachment fields from custom media uploader
- WordPress suddenly starts uploading media to an old (backdated) folder
- Interface for logged-in users to upload/download files
- Error uploading image in WordPress
- Can I change the URL of a video, or upload a video to a specific URL?
- The uploaded file could not be moved to wp-content/uploads/2019/07
- Using wp_enqueue_media() with switch_to_blog() issue
- Uploading website to Host
- WordPress Media Library – Upload space used
- Show media-frame-menu on custom Media Frame
- Local WordPress install plugin wont upload image
- Disable new WP3.5 Media Picker
- How to get the real file type for images that do not have an extension
- Images don’t update after being edited
- Moving Existing images from custom directory to WP’s upload directory
- Website does not reflect changes on live after uploading files via FTP
- Programmatically Upload File to WordPress Using an API [closed]
- How to call WordPress First Image Post or else Attached Image or Default
- Uploaded images result in a file url with full path on disk appended
- Change Link to Upload folder
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Which wordpress action fires after crunching
- Workaround to upload AVIF files
- SVG not displaying in Media Tab in Backend
- Changing WordPress media location and upload path to sub-domain not working
- Picture upload issue – broken thumbnail
- Unable to upload anything to WordPress site
- Uploads from site on Server A uploaded on Server B (Like sort of CDN)
- My image rotate 90 degree
- http upload error as a subscribed user
- Limit max upload file size in front end submmission form
- Cannot upload CSV via REST API: ‘Sorry, not allowed to upload this file type.’ but it does work through the WordPress Dashboard
- if user role is x – show image – wordpress
- How do I restore attachment from files in wp-upload